DispatchKeyValue(pack, "nextthink", "0.1"); // The fix to the laggy physics. This is what you're looking for on the forum. //SetEntProp(pack, Prop_Send, "movetype", MOVETYPE_FLYGRAVITY); //SetEntProp(pack, Prop_Data, "m_MoveType", MOVETYPE_FLYGRAVITY);
SetEntityMoveType(pack, MOVETYPE_FLYGRAVITY); SetEntProp(pack, Prop_Send, "movecollide", 1); // These two... SetEntProp(pack, Prop_Data, "m_MoveCollide", 1); // ...allow the pack to bounce. }
I'm trying to find a way to spawn a physics-affected health pack, like the ones dropped by players when killed in Medieval Mode or by a candy cane Scout.
Preferably within the boundaries of normal Sourcemod entity-spawning of CreateEntityByName and such.
So far, I got it to work except for one crucial thing:
The physics are updating in just half-seconds, resulting in it being slow and laggy.
The robust way would be an SDKCall on either CTFPowerup::DropSingleInstance() (applied to your health / ammo pack), or CTFPlayer::DropHealthPack() (which calls the former internally).
Internally, it sets MOVETYPE_FLYGRAVITY and MOVECOLLIDE_FLY_BOUNCE and a few other properties, including removing itself after some time and setting the owner.
The robust way would be an SDKCall on either CTFPowerup::DropSingleInstance() (applied to your health / ammo pack), or CTFPlayer::DropHealthPack() (which calls the former internally).
Internally, it sets MOVETYPE_FLYGRAVITY and MOVECOLLIDE_FLY_BOUNCE and a few other properties, including removing itself after some time and setting the owner.
Yeah, but that does require a signature.
I know I said 'screw it, go full sig', but my mind is kind of inconsistent. :I
If 1 week goes by and there still hasn't been a solution to this without using one, I'll mark this as Solved and use a signature instead.