Raising/lowering Weapon from outside Player: Difference between revisions
From The DarkMod Wiki
Jump to navigationJump to search
No edit summary |
m adding category tag |
||
Line 12: | Line 12: | ||
[[Category:SDK]] | [[Category:SDK]] | ||
[[Category:Player character]] |
Latest revision as of 05:13, 13 November 2019
Originally written by Ishtvan on http://forums.thedarkmod.com/topic/2870
Apparently it's not enough to call idPlayer::RaiseWeapon or LowerWeapon all the time (although Lloyd's grabber code just calls RaiseWeapon and it works, so I'm not sure what the circumstances are.) Anyway, to get it to work, I had to add the following line after LowerWeapon. It's changing a public bool in idPlayer. Otherwise the weapon was not lowered in my case.
idPlayer *self; // (assign self to the player) // lower weapon self->LowerWeapon(); // ADDITIONAL LINE REQUIRED: self->hiddenWeapon = true;