diff options
author | Tim Angus <tim@ngus.net> | 2001-07-03 03:08:56 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2001-07-03 03:08:56 +0000 |
commit | 29cd16eaf0c6ca52b63ea4645cf206c5f8b7d791 (patch) | |
tree | 83dd4679d41b2b8a6bacde989f973eba4a507722 /src/cgame | |
parent | e34d763c41d92804b4bd81417427b3b172d3994a (diff) |
Finished new turrets, fixed a few bugs notably the freeze-when-shot-by-turret bug
Diffstat (limited to 'src/cgame')
-rw-r--r-- | src/cgame/cg_buildable.c | 2 | ||||
-rw-r--r-- | src/cgame/cg_ents.c | 4 | ||||
-rw-r--r-- | src/cgame/cg_event.c | 2 | ||||
-rw-r--r-- | src/cgame/cg_local.h | 2 | ||||
-rw-r--r-- | src/cgame/cg_syscalls.c | 4 | ||||
-rw-r--r-- | src/cgame/cg_weapons.c | 31 |
6 files changed, 26 insertions, 19 deletions
diff --git a/src/cgame/cg_buildable.c b/src/cgame/cg_buildable.c index ec7d2858..0bba94ec 100644 --- a/src/cgame/cg_buildable.c +++ b/src/cgame/cg_buildable.c @@ -189,7 +189,7 @@ static void CG_RunBuildableLerpFrame( buildable_t buildable, lerpFrame_t *lf, in // see if the animation sequence is switching if ( newAnimation != lf->animationNumber || !lf->animation ) { - CG_SetLerpFrameAnimation( buildable, lf, newAnimation ); + CG_SetBuildableLerpFrameAnimation( buildable, lf, newAnimation ); } // if we have passed the current frame, move it to diff --git a/src/cgame/cg_ents.c b/src/cgame/cg_ents.c index 3b66aad6..1c36c2f8 100644 --- a/src/cgame/cg_ents.c +++ b/src/cgame/cg_ents.c @@ -409,6 +409,10 @@ static void CG_Missile( centity_t *cent ) { BG_EvaluateTrajectoryDelta( ¢->currentState.pos, cg.time, velocity ); + //TA: FIXME: hack until i figure out why trap_S_ALS has a problem with velocity` + if( s1->weapon == WP_PLASMAGUN ) + VectorClear( velocity ); + trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, velocity, weapon->missileSound ); } diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c index 61a3abe0..a9fa5138 100644 --- a/src/cgame/cg_event.c +++ b/src/cgame/cg_event.c @@ -937,7 +937,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) { ByteToDir( es->eventParm, dir ); CG_MissileHitWall( es->weapon, es->clientNum, position, dir, IMPACTSOUND_DEFAULT ); } - CG_RailTrail( ci, es->origin2, es->pos.trBase ); + CG_RailTrail( es->origin2, es->pos.trBase ); break; case EV_BULLET_HIT_WALL: diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h index fc009a62..ce615221 100644 --- a/src/cgame/cg_local.h +++ b/src/cgame/cg_local.h @@ -1349,7 +1349,7 @@ void CG_MissileHitPlayer( int weapon, vec3_t origin, vec3_t dir, int entityNum ) void CG_ShotgunFire( entityState_t *es ); void CG_Bullet( vec3_t origin, int sourceEntityNum, vec3_t normal, qboolean flesh, int fleshEntityNum ); -void CG_RailTrail( clientInfo_t *ci, vec3_t start, vec3_t end ); +void CG_RailTrail( vec3_t start, vec3_t end ); void CG_GrappleTrail( centity_t *ent, const weaponInfo_t *wi ); void CG_AddViewWeapon (playerState_t *ps); void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent ); diff --git a/src/cgame/cg_syscalls.c b/src/cgame/cg_syscalls.c index 5c4722ca..818a21d5 100644 --- a/src/cgame/cg_syscalls.c +++ b/src/cgame/cg_syscalls.c @@ -247,6 +247,10 @@ void trap_R_AddLightToScene( const vec3_t org, float intensity, float r, float g syscall( CG_R_ADDLIGHTTOSCENE, org, PASSFLOAT(intensity), PASSFLOAT(r), PASSFLOAT(g), PASSFLOAT(b) ); } +void trap_R_AddAdditiveLightToScene( const vec3_t org, float intensity, float r, float g, float b ) { + syscall( CG_R_ADDLIGHTTOSCENE, org, PASSFLOAT(intensity), PASSFLOAT(r), PASSFLOAT(g), PASSFLOAT(b) ); +} + void trap_R_RenderScene( const refdef_t *fd ) { syscall( CG_R_RENDERSCENE, fd ); } diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c index 470d1603..a3a3d315 100644 --- a/src/cgame/cg_weapons.c +++ b/src/cgame/cg_weapons.c @@ -183,7 +183,8 @@ static void CG_ShotgunEjectBrass( centity_t *cent ) { CG_RailTrail ========================== */ -void CG_RailTrail( clientInfo_t *ci, vec3_t start, vec3_t end ) { +void CG_RailTrail( vec3_t start, vec3_t end ) +{ localEntity_t *le; refEntity_t *re; @@ -209,9 +210,9 @@ void CG_RailTrail( clientInfo_t *ci, vec3_t start, vec3_t end ) { re->origin[2] -= 8; re->oldorigin[2] -= 8; - le->color[0] = ci->color[0] * 0.75; - le->color[1] = ci->color[1] * 0.75; - le->color[2] = ci->color[2] * 0.75; + le->color[0] = 0.75f; + le->color[1] = 0.75f; + le->color[2] = 0.75f; le->color[3] = 1.0f; AxisClear( re->axis ); @@ -238,9 +239,9 @@ void CG_RailTrail( clientInfo_t *ci, vec3_t start, vec3_t end ) { re->origin[2] -= 8; re->oldorigin[2] -= 8; - le->color[0] = ci->color[0] * 0.75; - le->color[1] = ci->color[1] * 0.75; - le->color[2] = ci->color[2] * 0.75; + le->color[0] = 0.75f; + le->color[1] = 0.75f; + le->color[2] = 0.75f; le->color[3] = 1.0f; AxisClear( re->axis ); @@ -830,18 +831,16 @@ Origin will be the exact tag point, which is slightly different than the muzzle point used for determining hits. =============== */ -static void CG_SpawnRailTrail( centity_t *cent, vec3_t origin ) { - clientInfo_t *ci; - - if ( cent->currentState.weapon != WP_RAILGUN ) { +static void CG_SpawnRailTrail( centity_t *cent, vec3_t origin ) +{ + if ( cent->currentState.weapon != WP_RAILGUN ) return; - } - if ( !cent->pe.railgunFlash ) { + + if ( !cent->pe.railgunFlash ) return; - } + cent->pe.railgunFlash = qtrue; - ci = &cgs.clientinfo[ cent->currentState.clientNum ]; - CG_RailTrail( ci, origin, cent->pe.railgunImpact ); + CG_RailTrail( origin, cent->pe.railgunImpact ); } |