Hi all,
This bug/irregularity has been a saga, and in spite of help from both Xavior and Trickle, I've FAILED to resolve it.
OBJECTIVE
To be able to show players with 'empty hands', ie no weapons.
BACKGROUND INFO
The AGR mod is based on 'Classic' CustomTF (circa 2000), which used a custom server called cpqwsv. The AGR version has been successfully ported (thanks to the Gurus) to FTE. There are lots of 'legacy' team/colour/skin stuff in there I haven't changed, most I haven't even looked at, and frankly am not sure how they work, or even if they are relevant to this issue. VWEPS have been installed (details below) and are otherwise working great.
CURERENT VWEP IMPLEMENTATION
In world.qc we load the VWEPS (standard VWEP practice):
Code: Select all
precache_vwep_model ( );
Code: Select all
void () VWEPS_SetModel
Code: Select all
void() W_SetCurrentAmmo /* IIUC this function checks if you need to change weapons due to
1. run out of ammo
2. reloading
3. if you change your weapon*/
Code: Select all
// Save the current weapon and remove it
self.weapon = self.current_weapon;
self.current_weapon = 0; / this is the main number I've been playing with
self.weaponmodel = ""; // I think this line only deals w the visual for the players first person view of his own weapon
self.weaponframe = 0; // not sure what this does
Code: Select all
// this restores the weapon
self.current_weapon = self.weapon;
The normal (light assault/super nailgun) VWEP looks like this:
'Weaponless' players (using the method above)are displayed with their VWEP weapons sticking out of their head, or at their feet:
When I set self.vw_index to '0', it reverts to the crappy older prevwep mdl. The only way I've made it show 'bare hands' is to use the (IIRC) daedelus gun, which has an interesting frame where the weapon is behind the players back, and he does indeed have bare hands. Unfortunately this resulted in a bug where when a player got his weapon back, he was given a free sniper rifle, ie the one permanently set to 'fast fire' mode.
Options:
1. Revert back to the daedelus gun solution, and simply stop the 'sniper rifle' bug
2. Make a new invisible VWEP, and assign it to the bare handed player
3. When a bare handed player is needed, make the code bypass the VWEP stuff
4. Investigate possibly gratuitous calls to VWEPS_SetMode, and W_SetCurrentAmmo - something might be 'contradicting' the call to remove the weapon..
If you're still reading, and an obvious solution/suggestion doesn't come to mind, please relax, I'm sure I can solve this with more study of the existing code, and consultations w Xavior and Trickle.
thanks for listening
OneManClan