diff options
author | Tim Angus <tim@ngus.net> | 2001-12-22 04:06:28 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2001-12-22 04:06:28 +0000 |
commit | 37651838b6ed3731f50ce0c798b02161ca2919ab (patch) | |
tree | 2954f8ec23fcd26b77d12aa70303b1a6ae28f6da /src | |
parent | d90bdf12e0aaa4cef3772d0d50fc40dfb1f09802 (diff) |
Bug fixes to droid->alien conversion :)
Diffstat (limited to 'src')
-rw-r--r-- | src/cgame/cg_event.c | 2 | ||||
-rw-r--r-- | src/cgame/cg_main.c | 2 | ||||
-rw-r--r-- | src/cgame/cg_weapons.c | 4 | ||||
-rw-r--r-- | src/game/bg_misc.c | 67 | ||||
-rw-r--r-- | src/game/bg_pmove.c | 4 | ||||
-rw-r--r-- | src/game/bg_public.h | 8 | ||||
-rw-r--r-- | src/game/g_active.c | 4 | ||||
-rw-r--r-- | src/game/g_buildable.c | 13 | ||||
-rw-r--r-- | src/game/g_client.c | 8 | ||||
-rw-r--r-- | src/game/g_cmds.c | 2 | ||||
-rw-r--r-- | src/game/g_main.c | 4 | ||||
-rw-r--r-- | src/game/g_weapon.c | 8 |
12 files changed, 81 insertions, 45 deletions
diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c index b8f87a84..ec521b80 100644 --- a/src/cgame/cg_event.c +++ b/src/cgame/cg_event.c @@ -138,7 +138,7 @@ static void CG_Obituary( entityState_t *ent ) { case MOD_HSPAWN: message = "should have run further"; break; - case MOD_DSPAWN: + case MOD_ASPAWN: message = "was melted by the acid blood"; break; default: diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c index 7cc25a3f..8f9a6668 100644 --- a/src/cgame/cg_main.c +++ b/src/cgame/cg_main.c @@ -824,7 +824,7 @@ static void CG_RegisterGraphics( void ) { cgs.media.alienNav3 = trap_R_RegisterShader( "alienNav3" ); cgs.media.alienNav2 = trap_R_RegisterShader( "alienNav2" ); cgs.media.alienNav1 = trap_R_RegisterShader( "alienNav1" ); - cgs.media.alienHealth = trap_R_RegisterShader( "gfx/2d/alienhealth.tga" ); + cgs.media.alienHealth = trap_R_RegisterShader( "gfx/2d/droidhealth.tga" ); cgs.media.armorModel = trap_R_RegisterModel( "models/powerups/armor/armor_yel.md3" ); cgs.media.armorIcon = trap_R_RegisterShaderNoMip( "icons/iconr_yellow" ); diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c index 7e2f78cc..b8794354 100644 --- a/src/cgame/cg_weapons.c +++ b/src/cgame/cg_weapons.c @@ -807,8 +807,8 @@ void CG_RegisterWeapon( int weaponNum ) { weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/melee/fstatck.wav", qfalse ); break; - case WP_DBUILD: - case WP_DBUILD2: + case WP_ABUILD: + case WP_ABUILD2: case WP_HBUILD: case WP_HBUILD2: //nowt diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index aacc5efb..ac7973ee 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -258,7 +258,7 @@ gitem_t bg_itemlist[] = "Alien Build", 0, IT_WEAPON, - WP_DBUILD, + WP_ABUILD, "", "" }, @@ -274,7 +274,7 @@ gitem_t bg_itemlist[] = "Alien Build 2", 0, IT_WEAPON, - WP_DBUILD2, + WP_ABUILD2, "", "" }, @@ -969,9 +969,9 @@ buildableAttributes_t bg_buildableList[ ] = 50, //int damage; 50, //int splashDamage; 200, //int splashRadius; - MOD_DSPAWN, //int meansOfDeath; + MOD_ASPAWN, //int meansOfDeath; BIT_ALIENS, //int team; - ( 1 << WP_DBUILD )|( 1 << WP_DBUILD2 ), //weapon_t buildWeapon; + ( 1 << WP_ABUILD )|( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 100, //int nextthink; 0, //int turretFireSpeed; @@ -998,9 +998,9 @@ buildableAttributes_t bg_buildableList[ ] = 50, //int damage; 20, //int splashDamage; 50, //int splashRadius; - MOD_DSPAWN, //int meansOfDeath; + MOD_ASPAWN, //int meansOfDeath; BIT_ALIENS, //int team; - ( 1 << WP_DBUILD )|( 1 << WP_DBUILD2 ), //weapon_t buildWeapon; + ( 1 << WP_ABUILD )|( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 100, //int nextthink; 0, //int turretFireSpeed; @@ -1027,9 +1027,9 @@ buildableAttributes_t bg_buildableList[ ] = 50, //int damage; 20, //int splashDamage; 50, //int splashRadius; - MOD_DSPAWN, //int meansOfDeath; + MOD_ASPAWN, //int meansOfDeath; BIT_ALIENS, //int team; - ( 1 << WP_DBUILD )|( 1 << WP_DBUILD2 ), //weapon_t buildWeapon; + ( 1 << WP_ABUILD )|( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 100, //int nextthink; 0, //int turretFireSpeed; @@ -1056,9 +1056,9 @@ buildableAttributes_t bg_buildableList[ ] = 50, //int damage; 20, //int splashDamage; 400, //int splashRadius; - MOD_DSPAWN, //int meansOfDeath; + MOD_ASPAWN, //int meansOfDeath; BIT_ALIENS, //int team; - ( 1 << WP_DBUILD )|( 1 << WP_DBUILD2 ), //weapon_t buildWeapon; + ( 1 << WP_ABUILD )|( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 500, //int nextthink; 0, //int turretFireSpeed; @@ -1085,9 +1085,9 @@ buildableAttributes_t bg_buildableList[ ] = 50, //int damage; 20, //int splashDamage; 50, //int splashRadius; - MOD_DSPAWN, //int meansOfDeath; + MOD_ASPAWN, //int meansOfDeath; BIT_ALIENS, //int team; - ( 1 << WP_DBUILD )|( 1 << WP_DBUILD2 ), //weapon_t buildWeapon; + ( 1 << WP_ABUILD )|( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 1000, //int nextthink; 0, //int turretFireSpeed; @@ -1108,15 +1108,15 @@ buildableAttributes_t bg_buildableList[ ] = { -15, -15, -15 }, //vec3_t mins; { 15, 15, 15 }, //vec3_t maxs; TR_GRAVITY, //trType_t traj; - 0.0, //float bounce; + 0.0, //float bounce; 0, //int buildPoints; 1000, //int health; 50, //int damage; 20, //int splashDamage; 50, //int splashRadius; - MOD_DSPAWN, //int meansOfDeath; + MOD_ASPAWN, //int meansOfDeath; BIT_ALIENS, //int team; - ( 1 << WP_DBUILD )|( 1 << WP_DBUILD2 ), //weapon_t buildWeapon; + ( 1 << WP_ABUILD )|( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; -1, //int nextthink; 0, //int turretFireSpeed; @@ -1129,6 +1129,35 @@ buildableAttributes_t bg_buildableList[ ] = qtrue //qboolean reactorTest; }, { + BA_A_HOVEL, //int buildNum; + "hovel", //char *buildName; + "Hovel", //char *humanName; + "team_alien_hovel", //char *entityName; + { "models/buildables/hovel/hovel.md3", 0, 0, 0 }, + { -50, -50, -20 }, //vec3_t mins; + { 50, 50, 20 }, //vec3_t maxs; + TR_GRAVITY, //trType_t traj; + 0.0, //float bounce; + 80, //int buildPoints; + 1000, //int health; + 50, //int damage; + 20, //int splashDamage; + 50, //int splashRadius; + MOD_ASPAWN, //int meansOfDeath; + BIT_ALIENS, //int team; + ( 1 << WP_ABUILD )|( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; + BANIM_IDLE1, //int idleAnim; + -1, //int nextthink; + 0, //int turretFireSpeed; + 0, //int turretRange; + WP_NONE, //weapon_t turretProjType; + 0.707f, //float minNormal; + qtrue, //qboolean invertNormal; + qtrue, //qboolean creepTest; + 120, //int creepSize; + qfalse //qboolean reactorTest; + }, + { BA_H_SPAWN, //int buildNum; "replicator", //char *buildName; "Replicator", //char *humanName; @@ -2780,7 +2809,7 @@ weaponAttributes_t bg_weapons[ ] = WUT_HUMANS //WUTeam_t team; }, { - WP_DBUILD, //int weaponNum; + WP_ABUILD, //int weaponNum; 100, //int price; SLOT_WEAPON, //int slots; "dbuild", //char *weaponName; @@ -2793,7 +2822,7 @@ weaponAttributes_t bg_weapons[ ] = WUT_ALIENS //WUTeam_t team; }, { - WP_DBUILD2, //int weaponNum; + WP_ABUILD2, //int weaponNum; 100, //int price; SLOT_WEAPON, //int slots; "dbuild2", //char *weaponName; @@ -3948,8 +3977,8 @@ qboolean BG_infiniteAmmo( int weapon ) case WP_VENOM: case WP_GRABANDCSAW: case WP_POUNCE: - case WP_DBUILD: - case WP_DBUILD2: + case WP_ABUILD: + case WP_ABUILD2: case WP_HBUILD: case WP_HBUILD2: return qtrue; diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index e83f6f70..b802e817 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -2363,8 +2363,8 @@ static void PM_Weapon( void ) case WP_PULSE_RIFLE: addTime = 50; break; - case WP_DBUILD: - case WP_DBUILD2: + case WP_ABUILD: + case WP_ABUILD2: case WP_HBUILD: case WP_HBUILD2: addTime = 1000; //abritutary since doesn't "fire" diff --git a/src/game/bg_public.h b/src/game/bg_public.h index ed8af0fe..bdaaa9c7 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -345,8 +345,8 @@ typedef enum WP_PULSE_RIFLE, //build weapons must remain in a block - WP_DBUILD, - WP_DBUILD2, + WP_ABUILD, + WP_ABUILD2, WP_HBUILD2, WP_HBUILD, //ok? @@ -405,6 +405,8 @@ typedef enum BA_A_TRAPPER, BA_A_BOOSTER, + BA_A_HOVEL, + BA_H_SPAWN, BA_H_DEF1, @@ -770,7 +772,7 @@ typedef enum { MOD_GRAPPLE, MOD_VENOM, MOD_HSPAWN, - MOD_DSPAWN + MOD_ASPAWN } meansOfDeath_t; diff --git a/src/game/g_active.c b/src/game/g_active.c index d1f33eb2..ba1382ba 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -495,8 +495,8 @@ void ClientTimerActions( gentity_t *ent, int msec ) switch( client->ps.weapon ) { - case WP_DBUILD: - case WP_DBUILD2: + case WP_ABUILD: + case WP_ABUILD2: case WP_HBUILD: case WP_HBUILD2: //set validity bit on buildable diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index 2d771a97..94cfea6d 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -708,7 +708,7 @@ void adef_findenemy( gentity_t *ent, int range ) for( target = g_entities; target < &g_entities[ level.num_entities ]; target++ ) { //if target is not valid keep searching - if( !ddef_checktarget( ent, target, range ) ) + if( !adef_checktarget( ent, target, range ) ) continue; //we found a target @@ -742,8 +742,8 @@ void ATrapper_Think( gentity_t *self ) } //if the current target is not valid find a new one - if( !ddef_checktarget( self, self->enemy, range ) ) - ddef_findenemy( self, range ); + if( !adef_checktarget( self, self->enemy, range ) ) + adef_findenemy( self, range ); //if a new target cannot be found don't do anything if( !self->enemy ) @@ -751,7 +751,7 @@ void ATrapper_Think( gentity_t *self ) //if we are pointing at our target and we can fire shoot it if( self->count < level.time ) - ddef_fireonenemy( self, firespeed ); + adef_fireonenemy( self, firespeed ); } @@ -1780,6 +1780,11 @@ gentity_t *G_buildItem( gentity_t *builder, buildable_t buildable, vec3_t origin built->pain = ASpawn_Pain; break; + case BA_A_HOVEL: + built->die = ASpawn_Die; + built->pain = ASpawn_Pain; + break; + case BA_H_SPAWN: built->die = HSpawn_Die; built->think = HSpawn_Think; diff --git a/src/game/g_client.c b/src/game/g_client.c index 99de9e8b..d58e7f85 100644 --- a/src/game/g_client.c +++ b/src/game/g_client.c @@ -1437,13 +1437,13 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn ) switch( ent->client->pers.pclass ) { case PCL_A_B_BASE: - BG_packWeapon( WP_DBUILD, client->ps.stats ); - BG_packAmmoArray( WP_DBUILD, client->ps.ammo, client->ps.powerups, 0, 0, 0 ); + BG_packWeapon( WP_ABUILD, client->ps.stats ); + BG_packAmmoArray( WP_ABUILD, client->ps.ammo, client->ps.powerups, 0, 0, 0 ); break; case PCL_A_B_LEV1: - BG_packWeapon( WP_DBUILD2, client->ps.stats ); - BG_packAmmoArray( WP_DBUILD2, client->ps.ammo, client->ps.powerups, 0, 0, 0 ); + BG_packWeapon( WP_ABUILD2, client->ps.stats ); + BG_packAmmoArray( WP_ABUILD2, client->ps.ammo, client->ps.powerups, 0, 0, 0 ); break; case PCL_A_O_BASE: diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 72f3d457..2c36243b 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -1708,7 +1708,7 @@ void Cmd_Destroy_f( gentity_t *ent ) if( tr.fraction < 1.0 && ( traceEnt->s.eType == ET_BUILDABLE ) && ( traceEnt->biteam == ent->client->pers.pteam ) && - ( ( ent->client->ps.weapon >= WP_DBUILD ) && + ( ( ent->client->ps.weapon >= WP_ABUILD ) && ( ent->client->ps.weapon <= WP_HBUILD ) ) ) G_Damage( traceEnt, ent, ent, forward, tr.endpos, 10000, 0, MOD_SUICIDE ); diff --git a/src/game/g_main.c b/src/game/g_main.c index a36b15ac..c8f5d3b4 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -766,10 +766,10 @@ void countSpawns( void ) if (!ent->inuse) continue; - if( !Q_stricmp( ent->classname, "team_alien_spawn" ) && ent->health > 0 ) + if( ent->s.modelindex == BA_A_SPAWN && ent->health > 0 ) level.numAlienSpawns++; - if( !Q_stricmp( ent->classname, "team_human_spawn" ) && ent->health > 0 ) + if( ent->s.modelindex == BA_H_SPAWN && ent->health > 0 ) level.numHumanSpawns++; } } diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index a9c3b66f..ab91f40c 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -1074,10 +1074,10 @@ void FireWeapon2( gentity_t *ent ) break; case WP_POUNCE: break; - case WP_DBUILD: + case WP_ABUILD: Weapon_Cancel_Build( ent ); break; - case WP_DBUILD2: + case WP_ABUILD2: Weapon_Cancel_Build( ent ); break; case WP_HBUILD: @@ -1169,10 +1169,10 @@ void FireWeapon( gentity_t *ent ) case WP_POUNCE: Weapon_Claw_Fire( ent ); break; - case WP_DBUILD: + case WP_ABUILD: Weapon_Build_Fire( ent, MN_D_BUILD ); break; - case WP_DBUILD2: + case WP_ABUILD2: Weapon_Build_Fire( ent, MN_D_BUILD ); break; case WP_HBUILD: |