![]() |
|
|
#1 |
|
Duplicate Projectiles
I'm trying to write in a function to spawn a projectile in a weapon. I can't subclass from the original projectilefire, so I've written this code:
Code:
function SpawnProjectile(Vector Start, Rotator Dir)
{
local UETFWeapon Fweapon;
local Projectile p;
FWeapon=UETFWeapon(Weapon);
if (Role < Role_Authority)
return;
if (Fweapon.BulletsInClip<=0){
Super.ModeDoReload();
return;
}
if (p==None){
p = Spawn(ProjectileClass,,, Start, Dir);
}
}
I believe only one projectile is actually replicated-the other doesn't seem to do damage. Any help with getting rid of the second projectile? -Maestro Last edited by Mychaeel; 7th Mar 2004 at 06:13 AM. Reason: [code] tags have [], not <> |
|
|
|
|
|
|
#2 |
|
Fire modes are spawned on both client and server, thus your check for role will always be true. Check weapon.role instead.
__________________
http://come.to/MrEvil |
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|