summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2003-09-01 17:37:17 +0000
committerTim Angus <tim@ngus.net>2003-09-01 17:37:17 +0000
commite390136fd151bfa813d250357815d4f38b1f927c (patch)
tree9ad200fcd5d635064b27f62eb8f8db134223e27e /src/game
parentbfe055a63d4ce8577e6b86c2e9535993ae592c59 (diff)
* Exorcised gitem_t
Diffstat (limited to 'src/game')
-rw-r--r--src/game/bg_public.h41
-rw-r--r--src/game/g_active.c2
-rw-r--r--src/game/g_cmds.c1
-rw-r--r--src/game/g_local.h2
-rw-r--r--src/game/g_spawn.c1
-rw-r--r--src/game/g_target.c4
6 files changed, 4 insertions, 47 deletions
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 );