mirror of
https://github.com/Ragora/T2-CPP.git
synced 2026-07-16 05:34:32 +00:00
Renamed Server to servertest.cs
made some upgrades to the scripts, and added in movement for players and vehicles inside a moving base. Also added a real setMPS function with x, y, and z.
This commit is contained in:
parent
cc00588cca
commit
4830623b7a
6 changed files with 58 additions and 19 deletions
|
|
@ -1,12 +0,0 @@
|
|||
// this is a test for katabatic only with both client and server running their scripts.
|
||||
// this should be run after joining the game, or you will fall through the map on spawn where the Team1 base used to be.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
memPatch("5BBBDC",getServPAddr()); //Hooks the serverProcess function
|
||||
$mg = new SimSet(MoveGroup);
|
||||
MoveGroup.add(Team1); //Adds the Team1 base to the movement group
|
||||
setMPS(0.5); // Moves the base 0.5 meters per second on the X axis.
|
||||
37
Patches/servertest.cs
Normal file
37
Patches/servertest.cs
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
// this is a test for katabatic only with both client and server running their scripts.
|
||||
// this should be run after joining the game, or you will fall through the map on spawn where the Team1 base used to be.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$movesim = new SimSet(MoveEffectSet);
|
||||
function onMoveRoutine(%obj, %offset, %center, %radius){
|
||||
|
||||
InitContainerRadiusSearch(%obj.getWorldBoxCenter(),%radius,$TypeMasks::PlayerObjectType | $TypeMasks::VehicleObjectType);
|
||||
%obj2=ContainerSearchNext();
|
||||
|
||||
while (%obj2) {
|
||||
if (!(MoveEffectSet.isMember(%obj2))) {
|
||||
MoveEffectSet.add(%obj2);
|
||||
}
|
||||
|
||||
%obj2 = ContainerSearchNext();
|
||||
}
|
||||
|
||||
$moveoffset=%offset;
|
||||
}
|
||||
|
||||
function moveRoutineDone() {
|
||||
for (%x=0;%x<(MoveEffectSet.getCount()); %x++) {
|
||||
%obj=MoveEffectSet.getObject(%x);
|
||||
%obj.setPosition(VectorAdd(%obj.position,$moveoffset));
|
||||
}
|
||||
MoveEffectSet.clear();
|
||||
|
||||
}
|
||||
|
||||
memPatch("5BBBDC",getServPAddr()); //Hooks the serverProcess function
|
||||
$mg = new SimSet(MoveGroup);
|
||||
MoveGroup.add(Team1); //Adds the Team1 base to the movement group
|
||||
setMPS(-10,0.0,0.0); // Moves the base 0.5 meters per second on the X axis.
|
||||
Loading…
Add table
Add a link
Reference in a new issue