mirror of
https://github.com/Ragora/T2-CPP.git
synced 2026-01-19 18:14:44 +00:00
Added a new TSTick call to TSExtension
This will allow running physics in TorqueScript with more accurate timing. Also added TSTick.cs which also enables InteriorInstance serverside movement support(Will allow clients to see movement without clientside patching).
This commit is contained in:
parent
bf06dadac9
commit
4c716d90c8
|
|
@ -7,6 +7,9 @@
|
|||
void serverProcessReplacement(unsigned int timeDelta) {
|
||||
unsigned int servertickaddr=0x602350;
|
||||
unsigned int serverthisptr=0x9E5EC0;
|
||||
char test[256]="";
|
||||
sprintf (test,"TSTick(%f);",(float)timeDelta/1000);
|
||||
Con::evaluate(test,false,NULL,false);
|
||||
__asm
|
||||
{
|
||||
mov ecx,serverthisptr
|
||||
|
|
@ -20,8 +23,8 @@ const char* congetServPAddr(Linker::SimObject *obj, S32 argc, const char *argv[]
|
|||
char test[256] = "";
|
||||
char test2[256]="";
|
||||
int spr=(signed int)*serverProcessReplacement;
|
||||
sprintf(test,"B8%8XFFD089EC5DC3",endian(spr));
|
||||
test2[0]=test[6];
|
||||
sprintf(test2,"B8%08XFFD089EC5DC3",endian(spr));
|
||||
/*test2[0]=test[6];
|
||||
test2[1]=test[7];
|
||||
test2[2]=test[4];
|
||||
test2[3]=test[5];
|
||||
|
|
@ -29,7 +32,7 @@ const char* congetServPAddr(Linker::SimObject *obj, S32 argc, const char *argv[]
|
|||
test2[5]=test[3];
|
||||
test2[6]=test[0];
|
||||
test2[7]=test[1];
|
||||
test2[8]=0;
|
||||
test2[8]=0;*/
|
||||
return test2;
|
||||
}
|
||||
const char *conGetAddress(Linker::SimObject *obj, S32 argc, const char *argv[])
|
||||
|
|
|
|||
3
Patches/TStick.cs
Normal file
3
Patches/TStick.cs
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
function TStick(%tick) {}
|
||||
memPatch("5240FD","B00190");
|
||||
memPatch("5BBBDC",getServPAddr());
|
||||
Loading…
Reference in a new issue