Tremulous Forum
		Mods => Modding Center => Topic started by: rotacak on October 28, 2009, 12:43:19 am
		
			
			- 
				Hi, I added secondary attack to pulse rifle and when I shoot I saw no bullets and hear no sound. But bullets are really there, I can destroy structures etc. with invisible bullets.
 
 If I will change in g_active.c this:
       case EV_FIRE_WEAPON:
 FireWeapon( ent );
 break;
 
 case EV_FIRE_WEAPON2:
 FireWeapon2( ent );
 break;
 to this:
 
       case EV_FIRE_WEAPON:
 FireWeapon( ent );
 break;
 
 case EV_FIRE_WEAPON2:
 FireWeapon( ent );
 break;
 then first and second attack should be same, but second is invisible and without sound. Why?
- 
				The "special effects" are generated on the client side, and the client checks the weaponMode, which is still WPM_SECONDARY even if you call FireWeapon() instead of FireWeapon2().
 
 I think a working dirty fix is to add "m->s.generic1 = WPM_PRIMARY;" at the end of pulseRifleFire().
 
 The proper way would be to alter the weapon.cfg of the pulse rifle, but ofc this requires a pk3 download.
 
- 
				Thanx alot. That hack works, bullets are visible, but sound still missing. When I changed weapon.cfg all is ok. Once again, thanx!