You are viewing our Forum Archives. To view or take place in current topics click here.
[Release] Earthquake & PlayFX [GHOST] [UPDATED TO TU11]
Posted:

[Release] Earthquake & PlayFX [GHOST] [UPDATED TO TU11]Posted:

Bitwise
  • Resident Elite
Status: Offline
Joined: Feb 09, 201410Year Member
Posts: 267
Reputation Power: 14
Status: Offline
Joined: Feb 09, 201410Year Member
Posts: 267
Reputation Power: 14
I reversed all these awhile ago, but I was watching some MW2 GSC menu's on youtube (can't remember why) And thought it would be cool seeing it all back again. I have already released this on se7ensins, on our code list.


1st, global declaring this function would be a good start;

int (*G_Temp)(float*source,int r4) = (int(__cdecl*)(float*,int))0x8242B430;
int (*G_EffectIndex)(char*effectName) = (int(__cdecl*)(char*))0x8215C6B0;



Earthquake



void doEarthquake(float scale, int duration, float*source, float radius)
{
   int eq = G_Temp(source,0x65);//
   *(float*)(eq + 0x54) = scale;
   *(float*)(eq + 0x58) = radius;
   *(int*)(eq + 0x5C) = duration;
        *(int*)(eq + 0xD4) = 0x00;
}



Call it like so;

float *origin[3] = { *(float*)(ps(0) + 0x1C), *(float*)(ps(0) + 0x20), *(float*)(ps(0) + 0x24) };
doEarthquake(0.3, 2, origin, 850);


The above would spawn the earthquake on client 0's origin, for 3 seconds, with a radius of 850 (Means anyone/anything in the radius will be effected by the earthquake). I remember earthquake being one off the main functions used in Nuke, other than spawning an entity with a nuke shell model on it, and smacking the map center and dealing about 0x18AE0 of damage with about 100000 radius, and setting the time scale from 1.0 to 0.00 (looping through, decreasing about every 500ms) and then ending the game. Can be easily re-created.


PlayFX



void playFx(float*source, int effectIndex)
{
   int entity = G_Temp(&source, 0x5B);
   *(int*)(entity + 0x9C) = effectIndex;
   *(int*)(entity + 0xD4) = 0x00;
        *(long long*)(entity + 0x40) = 0x00;
   *(float*)(entity + 0x3C) = 270.0f;
}


NOTE: effectIndex's can only range from 0x00000001 to 0x00000100



PlayFX is more known for it's usage in the Raining Money effect, where the effect would be spawned of the players origin off there spine, And is also known for it's usage in the uber jet pack. PlayFX and Earthquake have never really been touched or spoke about at all ever since the days of 2010. So I am glad to be the guy to maybe bring it back to life on Ghost's, and in 2014.

Earthquake & PlayFX have both been tested, and confirmed working. Enjoy :badger: :badger: :badger: :badger: :badger: :badger: :badger: :badger:


Last edited by Bitwise ; edited 6 times in total

The following 6 users thanked Bitwise for this useful post:

-Pawn (04-16-2014), Mildot (03-24-2014), DOLLARxHD (03-24-2014), Nissan (03-24-2014), Midterm (03-24-2014), Adamu (03-23-2014)
#2. Posted:
Adamu
  • Supporter
Status: Offline
Joined: Feb 02, 201311Year Member
Posts: 5,477
Reputation Power: 335
Status: Offline
Joined: Feb 02, 201311Year Member
Posts: 5,477
Reputation Power: 335
Thanks for the release Bitwise just hope people give you credit if they use this this time
#3. Posted:
Bitwise
  • Resident Elite
Status: Offline
Joined: Feb 09, 201410Year Member
Posts: 267
Reputation Power: 14
Status: Offline
Joined: Feb 09, 201410Year Member
Posts: 267
Reputation Power: 14
Monster-Munch wrote Thanks for the release Bitwise just hope people give you credit if they use this this time


Lol

Also I remember posting this on a thread, but since only afew people saw it and have been keeping it so called "private", I might aswell post it here;

int Scr_PrecacheShader(char*materialName)
{
   int level = *(int*)0x83109D80;
   int ran = *(int*)(level + 0x1C)
   if(ran != 0)
      _8224B9D0(0);
      ran = *(unsigned char*)(materialName + 0x00);
      if(ran != 0)
         return G_MaterialIndex(materialName);
      else
         return _82249E10();
   else
       return __82249E10();
}

The above is MW2, I can't seem to port the b*tch to ghost's -_- but yeah, you can simple do
MW2;

*(bool*)(0x83109D80 + 0x1C) = true;

Ghosts;

*(bool*)(0x83350BD8 + 0x2C) = true;

And it will set the precached shaders variable to true. Meaning all shaders are now precached. The following image is an example off what you can do, it is UnsignedMods using it.
Well, since I only reversed PrecacheShader and got it tested with shaders, I kinda assumed each one (shader, model, item) all had different variables. But instead, set that to true and literally everything is precached.
[ Register or Signin to view external links. ]


Last edited by Bitwise ; edited 2 times in total
#4. Posted:
Vicinity
  • Ladder Climber
Status: Offline
Joined: Mar 23, 201410Year Member
Posts: 385
Reputation Power: 16
Status: Offline
Joined: Mar 23, 201410Year Member
Posts: 385
Reputation Power: 16
Nice release man, good work!
#5. Posted:
IDA
  • Powerhouse
Status: Offline
Joined: Sep 21, 201310Year Member
Posts: 454
Reputation Power: 26
Status: Offline
Joined: Sep 21, 201310Year Member
Posts: 454
Reputation Power: 26
I believe your PlayFX does work, as I had someone test something and they said it was fine...

Spawned in map and on player ;)
#6. Posted:
Bitwise
  • Resident Elite
Status: Offline
Joined: Feb 09, 201410Year Member
Posts: 267
Reputation Power: 14
Status: Offline
Joined: Feb 09, 201410Year Member
Posts: 267
Reputation Power: 14
IDA wrote I believe your PlayFX does work, as I had someone test something and they said it was fine...

Spawned in map and on player ;)


Ahh, thanks for that. If anyone else wants to do abit off exploring;

void (*Scr_PlayFX)(int effectId, float*source, float*vecup, float*vecdown) = (void(__cdecl*)(int,float*,float*,float*))0x82411A49;
void (*GScr_Earthquake)(float*scale, int duration, float*source, int radius) = (void(__cdecl*)(float*,int,float*,int))0x8240DAF0;


And the following I posted on se7ensins, but I might aswell share it here too;

//wFlags - int wFlags[0x420];//within playerState_s

|= 0x80 //disable weapons
&= ~0x80 //enable weapons
|= 0x800 //disable weapon switching
&= ~0x800 //enable weapon switching
= 0x400 //no recoil
&= ~0x400 //recoil
= 0x20 //no ads
&= ~0x20 //ads
|= 0x8000 //disable weapon pickup
&= ~0x8000 //enable weapon pickup
|= 0x1000 //no offhand
&= ~0x1000 //offhand

ps + 0x434 = 0x02 //small crosshairs, mess around with the radius
ps + 0x3054 = G_ModelIndex(modelName); // view model
ps + 0x331C //mFlags, see the values below for whats what./*
0x00 - Default Movement
0x01 - Noclip
0x02 - UFO
0x03 - Noclip Type2
0x04 - Movement only frozen
0x05 - Gravity(not tested)
0x06 - Unknown
0x07 - Unknown
0x08 - Frozen Controls
*/


Here is something I literally just found;

void doSomething(float*r3)
{
     int entity = G_Temp(&r3, 0x1F);
     *(int*)(entity + 0xD4) = 0x0F0;
     *(int*)(entity + 0x9C) = 0x0F0;
     *(int*)(entity + 0xC4) = 0x0F0;
}

^Weird as hell, every value being loading into it, has been only stored into the GPR by thr stack pointer, and that's currently holding 0x0F0, until the stack frame is broken down at the end off the function.

Here's another


void iKeepfindingYoufags(float*r3, int r4, int r5, int r6, int r7, int gentity)
{
     int entity = G_Temp(&r3, 0x40);
     if(*(int*)(gentity + 0x160) != 0)//if the entity is a player?
        *(int*)(entity + 0xD4) |= 0x40;
     else
        *(int*)(entity + 0xD4) = 0x20;
     *(int*)(entity + 0xC8) = (r6 & 0xFF);
     *(int*)(entity + 0xC4) = r5;
     *(int*)(entity + 0x9C) = (r4 & 0xFF);
     *(int*)(entity + 0x78) = (r7 & 0xFFFF);
     *(int*)(entity + 0x80) = (*(int*)(gentity + 0x158 + 0x17C) & 0xFFFF);
     *(int*)(entity + 0x88) = (0x0000E25C & 0xFF);
}
#7. Posted:
Bitwise
  • Resident Elite
Status: Offline
Joined: Feb 09, 201410Year Member
Posts: 267
Reputation Power: 14
Status: Offline
Joined: Feb 09, 201410Year Member
Posts: 267
Reputation Power: 14
Bump;
Can't seem to get Earthquake to work anymore...no idea what I have done wrong. My original tester converted my code to C#, and said it was working. Then someone else tried, and said it doesn't work...but my original tester 'didn't save' the code he originaly converted, so he did it again and surprise surprise it didn't work.
#8. Posted:
xAcme
  • Junior Member
Status: Offline
Joined: Mar 24, 201410Year Member
Posts: 53
Reputation Power: 2
Status: Offline
Joined: Mar 24, 201410Year Member
Posts: 53
Reputation Power: 2
Bitwise wrote Bump;
Can't seem to get Earthquake to work anymore...no idea what I have done wrong. My original tester converted my code to C#, and said it was working. Then someone else tried, and said it doesn't work...but my original tester 'didn't save' the code he originaly converted, so he did it again and surprise surprise it didn't work.

Are you talking about TU8 or ghosts?
#9. Posted:
Bitwise
  • Resident Elite
Status: Offline
Joined: Feb 09, 201410Year Member
Posts: 267
Reputation Power: 14
Status: Offline
Joined: Feb 09, 201410Year Member
Posts: 267
Reputation Power: 14
xAcme wrote
Bitwise wrote Bump;
Can't seem to get Earthquake to work anymore...no idea what I have done wrong. My original tester converted my code to C#, and said it was working. Then someone else tried, and said it doesn't work...but my original tester 'didn't save' the code he original converted, so he did it again and surprise surprise it didn't work.

Are you talking about TU8 or ghosts?


What? Ghost's is TU10...why ask such a stupid and irrelevant question...
#10. Posted:
xAcme
  • Junior Member
Status: Offline
Joined: Mar 24, 201410Year Member
Posts: 53
Reputation Power: 2
Status: Offline
Joined: Mar 24, 201410Year Member
Posts: 53
Reputation Power: 2
Bitwise wrote
xAcme wrote
Bitwise wrote Bump;
Can't seem to get Earthquake to work anymore...no idea what I have done wrong. My original tester converted my code to C#, and said it was working. Then someone else tried, and said it doesn't work...but my original tester 'didn't save' the code he original converted, so he did it again and surprise surprise it didn't work.

Are you talking about TU8 or ghosts?


What? Ghost's is TU10...why ask such a stupid and irrelevant question...

I clearly said "or ghosts"
So quick to criticize/flame
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.