[quake3-commits] r1974 - in trunk/code: client game qcommon server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Wed May 11 10:21:27 EDT 2011
Author: thilo
Date: 2011-05-11 10:21:27 -0400 (Wed, 11 May 2011)
New Revision: 1974
Modified:
trunk/code/client/snd_main.c
trunk/code/game/g_local.h
trunk/code/game/g_public.h
trunk/code/game/g_spawn.c
trunk/code/qcommon/vm_powerpc_asm.c
trunk/code/server/sv_client.c
trunk/code/server/sv_snapshot.c
Log:
Refactoring patch by DevHC
Modified: trunk/code/client/snd_main.c
===================================================================
--- trunk/code/client/snd_main.c 2011-05-10 16:26:11 UTC (rev 1973)
+++ trunk/code/client/snd_main.c 2011-05-11 14:21:27 UTC (rev 1974)
@@ -16,7 +16,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with Foobar; if not, write to the Free Software
+along with Quake III Arena source code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
Modified: trunk/code/game/g_local.h
===================================================================
--- trunk/code/game/g_local.h 2011-05-10 16:26:11 UTC (rev 1973)
+++ trunk/code/game/g_local.h 2011-05-11 14:21:27 UTC (rev 1974)
@@ -337,7 +337,7 @@
struct gentity_s *gentities;
int gentitySize;
- int num_entities; // current number, <= MAX_GENTITIES
+ int num_entities; // MAX_CLIENTS <= num_entities <= ENTITYNUM_MAX_NORMAL
int warmupTime; // restart match at this time
Modified: trunk/code/game/g_public.h
===================================================================
--- trunk/code/game/g_public.h 2011-05-10 16:26:11 UTC (rev 1973)
+++ trunk/code/game/g_public.h 2011-05-11 14:21:27 UTC (rev 1974)
@@ -83,7 +83,7 @@
// when a trace call is made and passEntityNum != ENTITYNUM_NONE,
// an ent will be excluded from testing if:
- // ent->r.number == passEntityNum (don't interact with self)
+ // ent->s.number == passEntityNum (don't interact with self)
// ent->r.ownerNum == passEntityNum (don't interact with your own missiles)
// entity[ent->r.ownerNum].r.ownerNum == passEntityNum (don't interact with other missiles from owner)
int ownerNum;
Modified: trunk/code/game/g_spawn.c
===================================================================
--- trunk/code/game/g_spawn.c 2011-05-10 16:26:11 UTC (rev 1973)
+++ trunk/code/game/g_spawn.c 2011-05-11 14:21:27 UTC (rev 1974)
@@ -75,46 +75,40 @@
// fields are needed for spawning from the entity string
//
typedef enum {
- F_INT,
+ F_INT,
F_FLOAT,
- F_LSTRING, // string on disk, pointer in memory, TAG_LEVEL
- F_GSTRING, // string on disk, pointer in memory, TAG_GAME
+ F_STRING,
F_VECTOR,
- F_ANGLEHACK,
- F_ENTITY, // index on disk, pointer in memory
- F_ITEM, // index on disk, pointer in memory
- F_CLIENT, // index on disk, pointer in memory
- F_IGNORE
+ F_ANGLEHACK
} fieldtype_t;
typedef struct
{
char *name;
- int ofs;
+ size_t ofs;
fieldtype_t type;
} field_t;
field_t fields[] = {
- {"classname", FOFS(classname), F_LSTRING},
+ {"classname", FOFS(classname), F_STRING},
{"origin", FOFS(s.origin), F_VECTOR},
- {"model", FOFS(model), F_LSTRING},
- {"model2", FOFS(model2), F_LSTRING},
+ {"model", FOFS(model), F_STRING},
+ {"model2", FOFS(model2), F_STRING},
{"spawnflags", FOFS(spawnflags), F_INT},
{"speed", FOFS(speed), F_FLOAT},
- {"target", FOFS(target), F_LSTRING},
- {"targetname", FOFS(targetname), F_LSTRING},
- {"message", FOFS(message), F_LSTRING},
- {"team", FOFS(team), F_LSTRING},
+ {"target", FOFS(target), F_STRING},
+ {"targetname", FOFS(targetname), F_STRING},
+ {"message", FOFS(message), F_STRING},
+ {"team", FOFS(team), F_STRING},
{"wait", FOFS(wait), F_FLOAT},
{"random", FOFS(random), F_FLOAT},
{"count", FOFS(count), F_INT},
{"health", FOFS(health), F_INT},
- {"light", 0, F_IGNORE},
{"dmg", FOFS(damage), F_INT},
{"angles", FOFS(s.angles), F_VECTOR},
{"angle", FOFS(s.angles), F_ANGLEHACK},
- {"targetShaderName", FOFS(targetShaderName), F_LSTRING},
- {"targetShaderNewName", FOFS(targetShaderNewName), F_LSTRING},
+ {"targetShaderName", FOFS(targetShaderName), F_STRING},
+ {"targetShaderNewName", FOFS(targetShaderNewName), F_STRING},
{NULL}
};
@@ -128,10 +122,6 @@
void SP_info_player_start (gentity_t *ent);
void SP_info_player_deathmatch (gentity_t *ent);
void SP_info_player_intermission (gentity_t *ent);
-void SP_info_firstplace(gentity_t *ent);
-void SP_info_secondplace(gentity_t *ent);
-void SP_info_thirdplace(gentity_t *ent);
-void SP_info_podium(gentity_t *ent);
void SP_func_plat (gentity_t *ent);
void SP_func_static (gentity_t *ent);
@@ -155,7 +145,6 @@
void SP_target_speaker (gentity_t *ent);
void SP_target_print (gentity_t *ent);
void SP_target_laser (gentity_t *self);
-void SP_target_character (gentity_t *ent);
void SP_target_score( gentity_t *ent );
void SP_target_teleporter( gentity_t *ent );
void SP_target_relay (gentity_t *ent);
@@ -363,7 +352,7 @@
b = (byte *)ent;
switch( f->type ) {
- case F_LSTRING:
+ case F_STRING:
*(char **)(b+f->ofs) = G_NewString (value);
break;
case F_VECTOR:
@@ -384,9 +373,6 @@
((float *)(b+f->ofs))[1] = v;
((float *)(b+f->ofs))[2] = 0;
break;
- default:
- case F_IGNORE:
- break;
}
return;
}
Modified: trunk/code/qcommon/vm_powerpc_asm.c
===================================================================
--- trunk/code/qcommon/vm_powerpc_asm.c 2011-05-10 16:26:11 UTC (rev 1973)
+++ trunk/code/qcommon/vm_powerpc_asm.c 2011-05-11 14:21:27 UTC (rev 1974)
@@ -65,7 +65,6 @@
};
static const struct powerpc_opcode powerpc_opcodes[];
-static const int powerpc_num_opcodes;
#define PPC_OPCODE_PPC 1
#define PPC_OPCODE_POWER 2
@@ -112,7 +111,6 @@
};
static const struct powerpc_operand powerpc_operands[];
-static const unsigned int num_powerpc_operands;
#define PPC_OPERAND_SIGNED (0x1)
#define PPC_OPERAND_SIGNOPT (0x2)
@@ -390,7 +388,6 @@
};
-static const unsigned int num_powerpc_operands = ARRAY_LEN (powerpc_operands);
/* The functions used to insert and extract complicated operands. */
Modified: trunk/code/server/sv_client.c
===================================================================
--- trunk/code/server/sv_client.c 2011-05-10 16:26:11 UTC (rev 1973)
+++ trunk/code/server/sv_client.c 2011-05-11 14:21:27 UTC (rev 1974)
@@ -1537,7 +1537,7 @@
// the command, we will stop processing the rest of the packet,
// including the usercmd. This causes flooders to lag themselves
// but not other people
- // We don't do this when the client hasn't been active yet since its
+ // We don't do this when the client hasn't been active yet since it's
// normal to spam a lot of commands when downloading
if ( !com_cl_running->integer &&
cl->state >= CS_ACTIVE &&
Modified: trunk/code/server/sv_snapshot.c
===================================================================
--- trunk/code/server/sv_snapshot.c 2011-05-10 16:26:11 UTC (rev 1973)
+++ trunk/code/server/sv_snapshot.c 2011-05-11 14:21:27 UTC (rev 1974)
@@ -412,7 +412,7 @@
// add it
SV_AddEntToSnapshot( svEnt, ent, eNums );
- // if its a portal entity, add everything visible from its camera position
+ // if it's a portal entity, add everything visible from its camera position
if ( ent->r.svFlags & SVF_PORTAL ) {
if ( ent->s.generic1 ) {
vec3_t dir;
More information about the quake3-commits
mailing list