diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cgame/cg_local.h | 3 | ||||
-rw-r--r-- | src/cgame/cg_main.c | 9 | ||||
-rw-r--r-- | src/game/bg_public.h | 41 | ||||
-rw-r--r-- | src/game/g_active.c | 2 | ||||
-rw-r--r-- | src/game/g_cmds.c | 1 | ||||
-rw-r--r-- | src/game/g_local.h | 2 | ||||
-rw-r--r-- | src/game/g_spawn.c | 1 | ||||
-rw-r--r-- | src/game/g_target.c | 4 | ||||
-rw-r--r-- | src/ui/ui_players.c | 36 |
9 files changed, 28 insertions, 71 deletions
diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h index 366758d1..4fc20bd3 100644 --- a/src/cgame/cg_local.h +++ b/src/cgame/cg_local.h @@ -418,7 +418,6 @@ typedef struct typedef struct weaponInfo_s { qboolean registered; - gitem_t *item; char *humanName; qhandle_t handsModel; // the hands don't actually draw, they just position the weapon @@ -473,7 +472,7 @@ typedef struct typedef struct { - qhandle_t models[ MAX_ITEM_MODELS ]; + qhandle_t models[ MAX_BUILDABLE_MODELS ]; animation_t animations[ MAX_BUILDABLE_ANIMATIONS ]; //same number of sounds as animations diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c index cab4cda3..22db4dba 100644 --- a/src/cgame/cg_main.c +++ b/src/cgame/cg_main.c @@ -1385,11 +1385,10 @@ static clientInfo_t * CG_InfoFromScoreIndex( int index, int team, int *scoreInde static const char *CG_FeederItemText( float feederID, int index, int column, qhandle_t *handle ) { - gitem_t *item; - int scoreIndex = 0; - clientInfo_t *info = NULL; - int team = -1; - score_t *sp = NULL; + int scoreIndex = 0; + clientInfo_t *info = NULL; + int team = -1; + score_t *sp = NULL; *handle = -1; diff --git a/src/game/bg_public.h b/src/game/bg_public.h index 02456057..48fd2157 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -833,43 +833,6 @@ typedef enum //--------------------------------------------------------- -// gitem_t->type -typedef enum -{ - IT_BAD, - IT_WEAPON, // EFX: rotate + upscale + minlight - IT_BUILDABLE, //TA: gitem_t->type for buildable items (spawns etc.) - IT_UPGRADE, //TA: gitem_t->type for human upgrades - IT_AMMO, // EFX: rotate - IT_ARMOR, // EFX: rotate + minlight - IT_HEALTH, // EFX: static external sphere + rotating internal - IT_POWERUP, // instant on, timer based - // EFX: rotate + external ring that rotates - IT_HOLDABLE, // single use, holdable item - // EFX: rotate + bob - IT_TEAM -} itemType_t; - -#define MAX_ITEM_MODELS 4 - -typedef struct gitem_s -{ - char *classname; // spawning name - char *pickup_sound; - char *world_model[MAX_ITEM_MODELS]; - - char *icon; - char *pickup_name; // for printing on pickup - - int quantity; // for ammo how much, or duration of powerup - itemType_t giType; // IT_* flags - - int giTag; - - char *precaches; // string of all models and images this item will use - char *sounds; // string of all sounds this item will use -} gitem_t; - //TA: player class record typedef struct { @@ -927,6 +890,8 @@ typedef enum S3 } stage_t; +#define MAX_BUILDABLE_MODELS 4 + //TA: buildable item record typedef struct { @@ -936,7 +901,7 @@ typedef struct char *humanName; char *entityName; - char *models[ MAX_ITEM_MODELS ]; + char *models[ MAX_BUILDABLE_MODELS ]; vec3_t mins; vec3_t maxs; diff --git a/src/game/g_active.c b/src/game/g_active.c index 89a71b91..4fd29f84 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -653,8 +653,6 @@ void ClientEvents( gentity_t *ent, int oldEventSequence ) int damage; vec3_t dir; vec3_t point, mins; -// qboolean fired; - gitem_t *item; gentity_t *drop; float fallDistance; pClass_t class; diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 692b54b0..20952094 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -152,7 +152,6 @@ Give items to a client void Cmd_Give_f( gentity_t *ent ) { char *name; - gitem_t *it; int i; qboolean give_all; gentity_t *it_ent; diff --git a/src/game/g_local.h b/src/game/g_local.h index 89e1cc17..7020b8ec 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -171,8 +171,6 @@ struct gentity_s float wait; float random; - gitem_t *item; // for bonus items - int biteam; //TA: buildable item team gentity_t *parentNode; //TA: for creep and defence/spawn dependencies qboolean active; //TA: for power repeater, but could be useful elsewhere diff --git a/src/game/g_spawn.c b/src/game/g_spawn.c index 2dec4aa2..36ae42c8 100644 --- a/src/game/g_spawn.c +++ b/src/game/g_spawn.c @@ -295,7 +295,6 @@ returning qfalse if not found qboolean G_CallSpawn( gentity_t *ent ) { spawn_t *s; - gitem_t *item; buildable_t buildable; if( !ent->classname ) diff --git a/src/game/g_target.c b/src/game/g_target.c index 249d120a..9022eb06 100644 --- a/src/game/g_target.c +++ b/src/game/g_target.c @@ -23,6 +23,7 @@ Gives the activator all the items pointed to. */ void Use_Target_Give( gentity_t *ent, gentity_t *other, gentity_t *activator ) { + //TA: FIXME: well, this is fucked gentity_t *t; trace_t trace; @@ -37,9 +38,6 @@ void Use_Target_Give( gentity_t *ent, gentity_t *other, gentity_t *activator ) while( ( t = G_Find( t, FOFS( targetname ), ent->target ) ) != NULL ) { - if( !t->item ) - continue; - // make sure it isn't going to respawn or show any events t->nextthink = 0; trap_UnlinkEntity( t ); diff --git a/src/ui/ui_players.c b/src/ui/ui_players.c index 4a7740a6..ee2c5126 100644 --- a/src/ui/ui_players.c +++ b/src/ui/ui_players.c @@ -45,8 +45,10 @@ sfxHandle_t weaponChangeSound; UI_PlayerInfo_SetWeapon =============== */ -static void UI_PlayerInfo_SetWeapon( playerInfo_t *pi, weapon_t weaponNum ) { - gitem_t * item; +static void UI_PlayerInfo_SetWeapon( playerInfo_t *pi, weapon_t weaponNum ) +{ + //TA: FIXME: this is probably useless for trem +/* gitem_t * item; char path[MAX_QPATH]; pi->currentWeapon = weaponNum; @@ -86,46 +88,46 @@ tryagain: pi->flashModel = trap_R_RegisterModel( path ); switch( weaponNum ) { -/* case WP_GAUNTLET: + case WP_GAUNTLET: MAKERGB( pi->flashDlightColor, 0.6f, 0.6f, 1 ); - break;*/ + break; case WP_MACHINEGUN: MAKERGB( pi->flashDlightColor, 1, 1, 0 ); break; -/* case WP_SHOTGUN: + case WP_SHOTGUN: MAKERGB( pi->flashDlightColor, 1, 1, 0 ); - break;*/ + break; -/* case WP_GRENADE_LAUNCHER: + case WP_GRENADE_LAUNCHER: MAKERGB( pi->flashDlightColor, 1, 0.7f, 0.5f ); - break;*/ + break; -/* case WP_ROCKET_LAUNCHER: + case WP_ROCKET_LAUNCHER: MAKERGB( pi->flashDlightColor, 1, 0.75f, 0 ); - break;*/ + break; case WP_TESLAGEN: MAKERGB( pi->flashDlightColor, 0.6f, 0.6f, 1 ); break; -/* case WP_RAILGUN: + case WP_RAILGUN: MAKERGB( pi->flashDlightColor, 1, 0.5f, 0 ); - break;*/ + break; -/* case WP_BFG: + case WP_BFG: MAKERGB( pi->flashDlightColor, 1, 0.7f, 1 ); - break;*/ + break; -/* case WP_GRAPPLING_HOOK: + case WP_GRAPPLING_HOOK: MAKERGB( pi->flashDlightColor, 0.6f, 0.6f, 1 ); - break;*/ + break; default: MAKERGB( pi->flashDlightColor, 1, 1, 1 ); break; - } + }*/ } |