void PR_PrintState(void);
void PR_Crash (void);
-void SV_IncreaseEdicts(void);
-
prvm_edict_t *ED_Alloc (void);
void ED_Free (prvm_edict_t *ed);
void ED_ClearEdict (prvm_edict_t *e);
void ED_LoadFromFile (const char *data);
prvm_edict_t *EDICT_NUM_ERROR(int n, char *filename, int fileline);
-#define PRVM_EDICT_NUM(n) (((n) >= 0 && (n) < prog->max_edicts) ? prog->edicts + (n) : EDICT_NUM_ERROR(n, __FILE__, __LINE__))
-#define EDICT_NUM_UNSIGNED(n) (((n) < prog->max_edicts) ? prog->edicts + (n) : EDICT_NUM_ERROR(n, __FILE__, __LINE__))
+#define PRVM_EDICT_NUM(n) (((unsigned int)(n) < (unsigned int)prog->max_edicts) ? prog->edicts + (n) : EDICT_NUM_ERROR(n, __FILE__, __LINE__))
//int NUM_FOR_EDICT_ERROR(prvm_edict_t *e);
#define PRVM_NUM_FOR_EDICT(e) ((int)((prvm_edict_t *)(e) - prog->edicts))
void PRVM_ED_LoadFromFile (const char *data);
prvm_edict_t *PRVM_EDICT_NUM_ERROR(int n, char *filename, int fileline);
-#define PRVM_EDICT_NUM(n) (((n) >= 0 && (n) < prog->max_edicts) ? prog->edicts + (n) : PRVM_EDICT_NUM_ERROR(n, __FILE__, __LINE__))
-#define PRVM_EDICT_NUM_UNSIGNED(n) (((n) < prog->max_edicts) ? prog->edicts + (n) : PRVM_EDICT_NUM_ERROR(n, __FILE__, __LINE__))
+#define PRVM_EDICT_NUM(n) (((unsigned)(n) < (unsigned int)prog->max_edicts) ? prog->edicts + (n) : PRVM_EDICT_NUM_ERROR(n, __FILE__, __LINE__))
//int NUM_FOR_EDICT_ERROR(prvm_edict_t *e);
#define PRVM_NUM_FOR_EDICT(e) ((int)((prvm_edict_t *)(e) - prog->edicts))
grid = &world->areagrid_outside;
for (l = grid->next;l != grid;l = l->next)
{
- ent = PRVM_EDICT_NUM_UNSIGNED(l->entitynumber);
+ ent = PRVM_EDICT_NUM(l->entitynumber);
if (ent->priv.server->areagridmarknumber != world->areagrid_marknumber)
{
ent->priv.server->areagridmarknumber = world->areagrid_marknumber;
{
for (l = grid->next;l != grid;l = l->next)
{
- ent = PRVM_EDICT_NUM_UNSIGNED(l->entitynumber);
+ ent = PRVM_EDICT_NUM(l->entitynumber);
if (ent->priv.server->areagridmarknumber != world->areagrid_marknumber)
{
ent->priv.server->areagridmarknumber = world->areagrid_marknumber;