WARNING: PERS_HWEAPON_USE causes client engine to eat keys

Discussions about ET modding (sdk code, player/weapon modeling)

Moderators: Forum moderators, developers

Post Reply
User avatar
bani
Site Admin
Posts: 2780
Joined: Sun Jul 21, 2002 3:58 am
Contact:

WARNING: PERS_HWEAPON_USE causes client engine to eat keys

Post by bani »

A warning to anyone planning to change the usage of PERS_HWEAPON_USE in their mod.

If your client's current snap has PERS_HWEAPON_USE set, eg:

Code: Select all

cg.snap->ps.persistant[PERS_HWEAPON_USE]
the client engine will stomp the client's movement keys (cmd.upmove, cmd.rightmove, cmd.forwardmove). This includes demo playback!

In ET, PERS_HWEAPON_USE is enum as 12. If you are making a TC mod and have your own enums for ps.persistant[], keep this in mind. It may save you a lot of grief later :moo:
Post Reply