diff options
Diffstat (limited to 'src/game/g_misc.c')
-rw-r--r-- | src/game/g_misc.c | 114 |
1 files changed, 0 insertions, 114 deletions
diff --git a/src/game/g_misc.c b/src/game/g_misc.c index d8055f3a..fa7d660f 100644 --- a/src/game/g_misc.c +++ b/src/game/g_misc.c @@ -23,15 +23,6 @@ Used to group brushes together just for editor convenience. They are turned int */ -/*QUAKED info_camp (0 0.5 0) (-4 -4 -4) (4 4 4) -Used as a positional target for calculations in the utilities (spotlights, etc), but removed during gameplay. -*/ -void SP_info_camp( gentity_t *self ) -{ - G_SetOrigin( self, self->s.origin ); -} - - /*QUAKED info_null (0 0.5 0) (-4 -4 -4) (4 4 4) Used as a positional target for calculations in the utilities (spotlights, etc), but removed during gameplay. */ @@ -246,111 +237,6 @@ void SP_misc_portal_camera( gentity_t *ent ) /* ====================================================================== - SHOOTERS - -====================================================================== -*/ - -void Use_Shooter( gentity_t *ent, gentity_t *other, gentity_t *activator ) -{ - vec3_t dir; - float deg; - vec3_t up, right; - - // see if we have a target - if( ent->enemy ) - { - VectorSubtract( ent->enemy->r.currentOrigin, ent->s.origin, dir ); - VectorNormalize( dir ); - } - else - VectorCopy( ent->movedir, dir ); - - // randomize a bit - PerpendicularVector( up, dir ); - CrossProduct( up, dir, right ); - - deg = crandom( ) * ent->random; - VectorMA( dir, deg, up, dir ); - - deg = crandom( ) * ent->random; - VectorMA( dir, deg, right, dir ); - - VectorNormalize( dir ); - -/* switch ( ent->s.weapon ) { - case WP_GRENADE_LAUNCHER: - fire_grenade( ent, ent->s.origin, dir ); - break; - case WP_ROCKET_LAUNCHER: - fire_rocket( ent, ent->s.origin, dir ); - break; - }*/ - - G_AddEvent( ent, EV_FIRE_WEAPON, 0 ); -} - - -static void InitShooter_Finish( gentity_t *ent ) -{ - ent->enemy = G_PickTarget( ent->target ); - ent->think = 0; - ent->nextthink = 0; -} - -void InitShooter( gentity_t *ent, int weapon ) -{ - ent->use = Use_Shooter; - ent->s.weapon = weapon; - - /*RegisterItem( BG_FindItemForWeapon( weapon ) );*/ - - G_SetMovedir( ent->s.angles, ent->movedir ); - - if( !ent->random ) - ent->random = 1.0; - - ent->random = sin( M_PI * ent->random / 180 ); - // target might be a moving object, so we can't set movedir for it - if( ent->target ) - { - ent->think = InitShooter_Finish; - ent->nextthink = level.time + 500; - } - - trap_LinkEntity( ent ); -} - -/*QUAKED shooter_rocket (1 0 0) (-16 -16 -16) (16 16 16) -Fires at either the target or the current direction. -"random" the number of degrees of deviance from the taget. (1.0 default) -*/ -void SP_shooter_rocket( gentity_t *ent ) -{ - //InitShooter( ent, WP_ROCKET_LAUNCHER ); -} - -/*QUAKED shooter_plasma (1 0 0) (-16 -16 -16) (16 16 16) -Fires at either the target or the current direction. -"random" is the number of degrees of deviance from the taget. (1.0 default) -*/ -void SP_shooter_plasma( gentity_t *ent ) -{ - //InitShooter( ent, WP_PLASMAGUN); -} - -/*QUAKED shooter_grenade (1 0 0) (-16 -16 -16) (16 16 16) -Fires at either the target or the current direction. -"random" is the number of degrees of deviance from the taget. (1.0 default) -*/ -void SP_shooter_grenade( gentity_t *ent ) -{ - //InitShooter( ent, WP_GRENADE_LAUNCHER); -} - -/* -====================================================================== - NEAT EFFECTS AND STUFF FOR TREMULOUS ====================================================================== |