From 9022235d4b7ee9a5d49747ece27034bde6f9fd9a Mon Sep 17 00:00:00 2001 From: Richard Allen Date: Thu, 14 Jul 2011 18:29:55 +0000 Subject: [PATCH] Getting rid of the trap_RQ3LinkEntity debug function --- reaction/code/game/g_active.c | 2 +- reaction/code/game/g_arenas.c | 4 ++-- reaction/code/game/g_client.c | 6 +++--- reaction/code/game/g_combat.c | 2 +- reaction/code/game/g_items.c | 14 +++++++------- reaction/code/game/g_local.h | 1 - reaction/code/game/g_main.c | 33 ++------------------------------- reaction/code/game/g_misc.c | 26 +++++++++++++------------- reaction/code/game/g_missile.c | 10 +++++----- reaction/code/game/g_mover.c | 28 ++++++++++++++-------------- reaction/code/game/g_target.c | 4 ++-- reaction/code/game/g_teamplay.c | 2 +- reaction/code/game/g_trigger.c | 14 +++++++------- reaction/code/game/g_unlagged.c | 6 +++--- reaction/code/game/g_utils.c | 4 ++-- reaction/code/game/g_weapon.c | 6 +++--- reaction/cross-make-mingw.sh | 1 + 17 files changed, 67 insertions(+), 96 deletions(-) diff --git a/reaction/code/game/g_active.c b/reaction/code/game/g_active.c index 0d70063c..7f187226 100644 --- a/reaction/code/game/g_active.c +++ b/reaction/code/game/g_active.c @@ -1257,7 +1257,7 @@ void ClientThink_real(gentity_t * ent) // link entity now, after any personal teleporters have been used // JBravo: this call reactivates gibbed players. if (!ent->client->gibbed) - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); if (!ent->client->noclip) { G_TouchTriggers(ent); } diff --git a/reaction/code/game/g_arenas.c b/reaction/code/game/g_arenas.c index 187e558e..d563c9f7 100644 --- a/reaction/code/game/g_arenas.c +++ b/reaction/code/game/g_arenas.c @@ -162,7 +162,7 @@ static gentity_t *SpawnModelOnVictoryPad(gentity_t * pad, vec3_t offset, gentity G_SetOrigin(body, vec); - trap_RQ3LinkEntity(body, __LINE__, __FILE__); + trap_LinkEntity(body); body->count = place; @@ -283,7 +283,7 @@ static gentity_t *SpawnPodium(void) VectorSubtract(level.intermission_origin, podium->r.currentOrigin, vec); podium->s.apos.trBase[YAW] = vectoyaw(vec); - trap_RQ3LinkEntity(podium, __LINE__, __FILE__); + trap_LinkEntity(podium); podium->think = PodiumPlacementThink; podium->nextthink = level.time + 100; diff --git a/reaction/code/game/g_client.c b/reaction/code/game/g_client.c index 21a0eb02..58e46a89 100644 --- a/reaction/code/game/g_client.c +++ b/reaction/code/game/g_client.c @@ -814,7 +814,7 @@ void CopyToBodyQue(gentity_t * ent) } VectorCopy(body->s.pos.trBase, body->r.currentOrigin); - trap_RQ3LinkEntity(body, __LINE__, __FILE__); + trap_LinkEntity(body); } //====================================================================== @@ -1798,7 +1798,7 @@ void ClientSpawn(gentity_t * ent) } else { G_KillBox(ent); - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); // force the base weapon up //Blaze: Changed WP_MACHINEGUN to WP_PISTOL @@ -1893,7 +1893,7 @@ void ClientSpawn(gentity_t * ent) if (ent->client->sess.sessionTeam != TEAM_SPECTATOR) { BG_PlayerStateToEntityState(&client->ps, &ent->s, qtrue); VectorCopy(ent->client->ps.origin, ent->r.currentOrigin); - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); } // run the presend to set anything else // JBravo: We should not have to call this during TP spawns diff --git a/reaction/code/game/g_combat.c b/reaction/code/game/g_combat.c index 2b9a4a68..df42cbbe 100644 --- a/reaction/code/game/g_combat.c +++ b/reaction/code/game/g_combat.c @@ -1658,7 +1658,7 @@ void player_die(gentity_t * self, gentity_t * inflictor, gentity_t * attacker, i // JBravo: lets not relink players that have been gibbed here. if (!self->client->gibbed) - trap_RQ3LinkEntity(self, __LINE__, __FILE__); + trap_LinkEntity(self); } /* diff --git a/reaction/code/game/g_items.c b/reaction/code/game/g_items.c index e4ffb949..ea137aa0 100644 --- a/reaction/code/game/g_items.c +++ b/reaction/code/game/g_items.c @@ -496,7 +496,7 @@ void RespawnItem(gentity_t * ent) ent->r.contents = CONTENTS_TRIGGER; ent->s.eFlags &= ~EF_NODRAW; ent->r.svFlags &= ~SVF_NOCLIENT; - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); if (ent->item->giType == IT_POWERUP) { // play powerup spawn sound to all clients @@ -767,7 +767,7 @@ void Touch_Item(gentity_t * ent, gentity_t * other, trace_t * trace) ent->nextthink = level.time + respawn * 1000; ent->think = RespawnItem; } - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); } //====================================================================== @@ -872,7 +872,7 @@ gentity_t *LaunchItem(gitem_t * item, vec3_t origin, vec3_t velocity, int xr_fla dropped->physicsBounce = 0.1f; } - trap_RQ3LinkEntity(dropped, __LINE__, __FILE__); + trap_LinkEntity(dropped); return dropped; } @@ -1027,7 +1027,7 @@ void FinishSpawningItem(gentity_t * ent) return; } - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); } qboolean itemRegistered[MAX_ITEMS]; @@ -1071,7 +1071,7 @@ void G_CheckTeamItems(void) ent->s.pos.trType = TR_STATIONARY; ent->s.modelindex = TEAM_RED; G_SetOrigin(ent, flag->s.origin); - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); } // NiceAss: Find the blue flag @@ -1088,7 +1088,7 @@ void G_CheckTeamItems(void) ent->s.pos.trType = TR_STATIONARY; ent->s.modelindex = TEAM_BLUE; G_SetOrigin(ent, flag->s.origin); - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); } } } @@ -1374,7 +1374,7 @@ void G_RunItem(gentity_t * ent) ent->s.angles[1] = (level.time & 1023) * 360 / 1024.0f; } - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); // FIXME: avoid this for stationary? + trap_LinkEntity(ent); // FIXME: avoid this for stationary? // check think function G_RunThink(ent); diff --git a/reaction/code/game/g_local.h b/reaction/code/game/g_local.h index cba4534d..5357cf4a 100644 --- a/reaction/code/game/g_local.h +++ b/reaction/code/game/g_local.h @@ -1305,7 +1305,6 @@ void QDECL G_Error(const char *fmt, ...); void RQ3_StartUniqueItems(void); // JBravo: added -void trap_RQ3LinkEntity(gentity_t *ent, int line, char *file); void trap_RQ3UnlinkEntity(gentity_t *ent, int line, char *file); void trap_RQ3AdjustAreaPortalState(gentity_t *ent, qboolean open, int line, char *file); diff --git a/reaction/code/game/g_main.c b/reaction/code/game/g_main.c index dba6d549..3b999f9c 100644 --- a/reaction/code/game/g_main.c +++ b/reaction/code/game/g_main.c @@ -829,35 +829,6 @@ void QDECL G_Error(const char *fmt, ...) trap_Error(text); } -/* -================ -trap_RQ3LinkEntity, trap_RQ3UnlinkEntity and trap_RQ3AdjustAreaPortalState -Written by JBravo to catch the bad gEnt bug -// if (!((((btye*)ent - (byte*)g_entities)) % sizeof(gentity_t)) -// ((((btye*)ent - (byte*)g_entities)) / sizeof(gentity_t))) -================ -*/ -void trap_RQ3LinkEntity(gentity_t *ent, int line, char *file) -{ - if (ent == NULL) { - trap_SendServerCommand(-1, va("print \"^1trap_LinkEntity got called with a NULL ent from line %d of file %s. PLEASE report this to the RQ3 team\n\"", line, file)); - G_Printf("^1trap_LinkEntity got called with a NULL ent from line %d of file %s. PLEASE report this to the RQ3 team\n", line, file); - G_LogPrintf("trap_LinkEntity got called with a NULL ent from line %d of file %s. PLEASE report this to the RQ3 team\n", line, file); - } - if (ent-g_entities < 0 || ent-g_entities > level.num_entities) { - trap_SendServerCommand(-1, va("print \"^1trap_LinkEntity got called with a unaligned ent from line %d of file %s. PLEASE report this to the RQ3 team\n\"", line, file)); - G_Printf("^1trap_LinkEntity got called with a unaligned ent from line %d of file %s. PLEASE report this to the RQ3 team\n", line, file); - G_LogPrintf("trap_LinkEntity got called with a unaligned ent from line %d of file %s. PLEASE report this to the RQ3 team\n", line, file); - } - if (ent->s.number <0 || ent->s.number > level.num_entities) { - trap_SendServerCommand(-1, va("print \"^1trap_LinkEntity got called with s.number outof range from line %d of file %s. PLEASE report this to the RQ3 team\n\"", line, file)); - G_Printf("^1trap_LinkEntity got called with s.number outof range from line %d of file %s. PLEASE report this to the RQ3 team\n", line, file); - G_LogPrintf("trap_LinkEntity got called with s.number outof range from line %d of file %s. PLEASE report this to the RQ3 team\n", line, file); - } - - trap_LinkEntity(ent); -} - void trap_RQ3UnlinkEntity(gentity_t *ent, int line, char *file) { if (ent == NULL) { @@ -1230,7 +1201,7 @@ void G_InitMoveParents( void ) //this is so cgame knows which entity is the moveparent ent->s.time2 = ent->moveParent_ent - g_entities; if (ent->r.linked) - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); break; } } @@ -2822,7 +2793,7 @@ void G_RunAttachedEnt(gentity_t *ent) VectorCopy(ent->moveParent_ent->r.currentOrigin, ent->s.origin2); } if (ent->r.linked) - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); } /* diff --git a/reaction/code/game/g_misc.c b/reaction/code/game/g_misc.c index a3ca11d1..d3c3c4bb 100644 --- a/reaction/code/game/g_misc.c +++ b/reaction/code/game/g_misc.c @@ -461,14 +461,14 @@ void SP_dlight(gentity_t * ent) VectorCopy(ent->s.origin, ent->s.pos.trBase); ent->s.eType = ET_DLIGHT; - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); } /* // Nothing significant to do void G_RunDlight(gentity_t * ent) { - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); } */ @@ -592,7 +592,7 @@ void SP_func_shadow(gentity_t *ent) trap_SetConfigstring(CS_SHADOWS, info); ent->s.eType = ET_SHADOW; - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); } @@ -600,7 +600,7 @@ void SP_misc_corona(gentity_t *ent) { ent->s.eType = ET_CORONA; //ent->r.svFlags = SVF_NOCLIENT; - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); } @@ -657,7 +657,7 @@ void TeleportPlayer(gentity_t * player, vec3_t origin, vec3_t angles) VectorCopy(player->client->ps.origin, player->r.currentOrigin); if (player->client->sess.sessionTeam != TEAM_SPECTATOR) { - trap_RQ3LinkEntity(player, __LINE__, __FILE__); + trap_LinkEntity(player); } } @@ -682,7 +682,7 @@ void SP_misc_model(gentity_t * ent) ent->s.modelindex = G_ModelIndex(ent->model); VectorSet(ent->mins, -16, -16, -16); VectorSet(ent->maxs, 16, 16, 16); - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); G_SetOrigin(ent, ent->s.origin); VectorCopy(ent->s.angles, ent->s.apos.trBase); @@ -757,7 +757,7 @@ void SP_misc_portal_surface(gentity_t * ent) { VectorClear(ent->r.mins); VectorClear(ent->r.maxs); - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); ent->r.svFlags = SVF_PORTAL; ent->s.eType = ET_PORTAL; @@ -798,7 +798,7 @@ void SP_misc_portal_camera(gentity_t * ent) VectorClear(ent->r.mins); VectorClear(ent->r.maxs); - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); G_SpawnFloat("roll", "0", &roll); @@ -864,7 +864,7 @@ void SP_misc_sky_portal(gentity_t * ent) ent->think = Think_SetupSkyPortal; ent->nextthink = level.time + FRAMETIME; - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); } /* @@ -941,7 +941,7 @@ void InitShooter(gentity_t * ent, int weapon) ent->think = InitShooter_Finish; ent->nextthink = level.time + 500; } - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); } /*QUAKED shooter_rocket (1 0 0) (-16 -16 -16) (16 16 16) @@ -1051,7 +1051,7 @@ If you wish to add a custom breakable to your map, please include your mapname ( void reset_breakable(gentity_t *ent) { - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); ent->exploded = qfalse; ent->takedamage = qtrue; @@ -1274,7 +1274,7 @@ void SP_func_breakable(gentity_t * ent) //ent->think = Think_SpawnNewDoorTrigger; ent->r.svFlags |= SVF_USE_CURRENT_ORIGIN; - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); } @@ -1435,7 +1435,7 @@ void SP_func_pressure(gentity_t * ent) // Make it appear as the brush trap_SetBrushModel(ent, ent->model); - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); VectorCopy(ent->s.origin, ent->s.pos.trBase); VectorCopy(ent->s.origin, ent->r.currentOrigin); diff --git a/reaction/code/game/g_missile.c b/reaction/code/game/g_missile.c index c2a5d7db..d6d6e71a 100644 --- a/reaction/code/game/g_missile.c +++ b/reaction/code/game/g_missile.c @@ -140,7 +140,7 @@ void G_ExplodeMissile(gentity_t * ent) } //Elder: huhh? //G_Printf("exploding knife\n"); - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); } /* @@ -231,8 +231,8 @@ void G_MissileImpact(gentity_t * ent, trace_t * trace) ent->parent->client->ps.pm_flags |= PMF_GRAPPLE_PULL; VectorCopy(ent->r.currentOrigin, ent->parent->client->ps.grapplePoint); - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); - trap_RQ3LinkEntity(nent, __LINE__, __FILE__); + trap_LinkEntity(ent); + trap_LinkEntity(nent); return; } @@ -351,7 +351,7 @@ void G_MissileImpact(gentity_t * ent, trace_t * trace) } } - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); } /* @@ -387,7 +387,7 @@ void G_RunMissile(gentity_t * ent) VectorCopy(tr.endpos, ent->r.currentOrigin); } - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); if (tr.fraction != 1) { // never explode or bounce on sky diff --git a/reaction/code/game/g_mover.c b/reaction/code/game/g_mover.c index 7b132b11..05aa942e 100644 --- a/reaction/code/game/g_mover.c +++ b/reaction/code/game/g_mover.c @@ -368,7 +368,7 @@ qboolean G_TryPushingEntity(gentity_t * check, gentity_t * pusher, vec3_t move, } else { VectorCopy(check->s.pos.trBase, check->r.currentOrigin); } - trap_RQ3LinkEntity(check, __LINE__, __FILE__); + trap_LinkEntity(check); return qtrue; } // if it is ok to leave in the old position, do it @@ -438,7 +438,7 @@ qboolean G_TryPushingProxMine(gentity_t * check, gentity_t * pusher, vec3_t move ret = G_CheckProxMinePosition(check); if (ret) { VectorCopy(check->s.pos.trBase, check->r.currentOrigin); - trap_RQ3LinkEntity(check, __LINE__, __FILE__); + trap_LinkEntity(check); } return ret; } @@ -508,7 +508,7 @@ qboolean G_MoverPush(gentity_t * pusher, vec3_t move, vec3_t amove, gentity_t ** // move the pusher to it's final position VectorAdd(pusher->r.currentOrigin, move, pusher->r.currentOrigin); VectorAdd(pusher->r.currentAngles, amove, pusher->r.currentAngles); - trap_RQ3LinkEntity(pusher, __LINE__, __FILE__); + trap_LinkEntity(pusher); // see if any solid entities are inside the final position for (e = 0; e < listedEntities; e++) { @@ -581,7 +581,7 @@ qboolean G_MoverPush(gentity_t * pusher, vec3_t move, vec3_t amove, gentity_t ** p->ent->client->ps.delta_angles[YAW] = p->deltayaw; //VectorCopy (p->origin, p->ent->client->ps.origin); } -// trap_RQ3LinkEntity (p->ent, __LINE__, __FILE__); +// trap_LinkEntity (p->ent); } // return qfalse; continue; @@ -605,7 +605,7 @@ qboolean G_MoverPush(gentity_t * pusher, vec3_t move, vec3_t amove, gentity_t ** p->ent->client->ps.delta_angles[YAW] = p->deltayaw; VectorCopy(p->origin, p->ent->client->ps.origin); } - trap_RQ3LinkEntity(p->ent, __LINE__, __FILE__); + trap_LinkEntity(p->ent); } return qfalse; } @@ -652,7 +652,7 @@ void G_MoverTeam(gentity_t * ent) G_EvaluateTrajectoryEx(part, level.time, part->r.currentOrigin, part->r.currentAngles); //Makro - set blocked flag so that clients don't predict movement for this frame part->s.eFlags |= EF_MOVER_BLOCKED; - trap_RQ3LinkEntity(part, __LINE__, __FILE__); + trap_LinkEntity(part); } // if the pusher has a "blocked" function, call it @@ -784,7 +784,7 @@ void SetMoverState(gentity_t * ent, moverState_t moverState, int time) //G_EvaluateTrajectory(&ent->s.apos, level.time, ent->r.currentAngles); G_EvaluateTrajectoryEx(ent, level.time, ent->r.currentOrigin, ent->r.currentAngles); - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); } /* @@ -1263,7 +1263,7 @@ void InitMover(gentity_t * ent) ent->r.svFlags = SVF_USE_CURRENT_ORIGIN; ent->s.eType = ET_MOVER; VectorCopy(ent->pos1, ent->r.currentOrigin); - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); ent->s.pos.trType = TR_STATIONARY; VectorCopy(ent->pos1, ent->s.pos.trBase); @@ -1510,7 +1510,7 @@ void Think_SpawnNewDoorTrigger(gentity_t * ent) other->touch = Touch_DoorTrigger; // remember the thinnest axis other->count = best; - trap_RQ3LinkEntity(other, __LINE__, __FILE__); + trap_LinkEntity(other); } //Makro - some doors shouldn't have triggers for spectators if (!ent->explosive) { @@ -1538,7 +1538,7 @@ void Think_SpawnNewDoorTrigger(gentity_t * ent) other->touch = Touch_DoorTriggerSpectator; // remember the thinnest axis other->count = best; - trap_RQ3LinkEntity(other, __LINE__, __FILE__); + trap_LinkEntity(other); } MatchTeam(ent, ent->moverState, level.time); @@ -1965,7 +1965,7 @@ void InitRotator(gentity_t * ent) ent->r.svFlags = SVF_USE_CURRENT_ORIGIN; ent->s.eType = ET_MOVER; VectorCopy(ent->pos1, ent->r.currentAngles); - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); ent->s.apos.trType = TR_STATIONARY; VectorCopy(ent->pos1, ent->s.apos.trBase); @@ -2069,7 +2069,7 @@ void SpawnPlatTrigger(gentity_t * ent) VectorCopy(tmin, trigger->r.mins); VectorCopy(tmax, trigger->r.maxs); - trap_RQ3LinkEntity(trigger, __LINE__, __FILE__); + trap_LinkEntity(trigger); } /*QUAKED func_plat (0 .5 .8) ? @@ -2661,7 +2661,7 @@ void SP_func_static(gentity_t * ent) ent->use = use_func_static; ent->reset = reset_func_static; ent->reset(ent); - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); } /* @@ -2709,7 +2709,7 @@ void SP_func_rotating(gentity_t * ent) VectorCopy(ent->s.pos.trBase, ent->r.currentOrigin); VectorCopy(ent->s.apos.trBase, ent->r.currentAngles); - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); } /* diff --git a/reaction/code/game/g_target.c b/reaction/code/game/g_target.c index c5d2c6d6..eb7dbef5 100644 --- a/reaction/code/game/g_target.c +++ b/reaction/code/game/g_target.c @@ -317,7 +317,7 @@ void SP_target_speaker(gentity_t * ent) // must link the entity so we get areas and clusters so // the server can determine who to send updates to - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); } //========================================================== @@ -352,7 +352,7 @@ void target_laser_think(gentity_t * self) VectorCopy(tr.endpos, self->s.origin2); - trap_RQ3LinkEntity(self, __LINE__, __FILE__); + trap_LinkEntity(self); self->nextthink = level.time + FRAMETIME; } diff --git a/reaction/code/game/g_teamplay.c b/reaction/code/game/g_teamplay.c index 9d5a70f0..f88a3a72 100644 --- a/reaction/code/game/g_teamplay.c +++ b/reaction/code/game/g_teamplay.c @@ -1047,7 +1047,7 @@ void SpawnPlayers() ent = &g_entities[i]; if (ent != NULL && ent->classname != NULL && !strcmp(ent->classname, "func_breakable")) { //re-link all unlinked breakables - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); ent->exploded = qfalse; ent->takedamage = qtrue; diff --git a/reaction/code/game/g_trigger.c b/reaction/code/game/g_trigger.c index 9d5ebec4..3041fbb8 100644 --- a/reaction/code/game/g_trigger.c +++ b/reaction/code/game/g_trigger.c @@ -237,7 +237,7 @@ void SP_trigger_multiple(gentity_t * ent) ent->reset = Reset_Multi; InitTrigger(ent); - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); } /* @@ -260,7 +260,7 @@ void trigger_always_think(gentity_t * ent) //Makro - reset function void trigger_always_reset(gentity_t *ent) { - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); ent->nextthink = level.time + 300; ent->think = trigger_always_think; } @@ -392,7 +392,7 @@ void SP_trigger_push(gentity_t * self) self->touch = trigger_push_touch; self->think = AimAtTarget; self->nextthink = level.time + FRAMETIME; - trap_RQ3LinkEntity(self, __LINE__, __FILE__); + trap_LinkEntity(self); } void Use_target_push(gentity_t * self, gentity_t * other, gentity_t * activator) @@ -511,7 +511,7 @@ void SP_trigger_teleport(gentity_t * self) self->s.eType = ET_TELEPORT_TRIGGER; self->touch = trigger_teleporter_touch; - trap_RQ3LinkEntity(self, __LINE__, __FILE__); + trap_LinkEntity(self); } /* @@ -539,7 +539,7 @@ void hurt_reset(gentity_t *ent) { ent->timestamp = level.time; if (!(ent->spawnflags & 1)) { - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); } else { //Makro - added trap_RQ3UnlinkEntity(ent, __LINE__, __FILE__); @@ -551,7 +551,7 @@ void hurt_use(gentity_t * self, gentity_t * other, gentity_t * activator) if (self->r.linked) { trap_RQ3UnlinkEntity(self, __LINE__, __FILE__); } else { - trap_RQ3LinkEntity(self, __LINE__, __FILE__); + trap_LinkEntity(self); } } @@ -615,7 +615,7 @@ void SP_trigger_hurt(gentity_t * self) // link in to the world if starting active if (!(self->spawnflags & 1)) { - trap_RQ3LinkEntity(self, __LINE__, __FILE__); + trap_LinkEntity(self); } else { //Makro - added trap_RQ3UnlinkEntity(self, __LINE__, __FILE__); diff --git a/reaction/code/game/g_unlagged.c b/reaction/code/game/g_unlagged.c index ae0933aa..ff614842 100644 --- a/reaction/code/game/g_unlagged.c +++ b/reaction/code/game/g_unlagged.c @@ -197,7 +197,7 @@ Move a client back to where he was at the specified "time" trap_SendServerCommand(debugger - g_entities, msg); } // this will recalculate absmin and absmax - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); } else { // we wrapped, so grab the earliest VectorCopy(ent->client->history[k].currentOrigin, ent->r.currentOrigin); @@ -205,7 +205,7 @@ Move a client back to where he was at the specified "time" VectorCopy(ent->client->history[k].maxs, ent->r.maxs); // this will recalculate absmin and absmax - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); } } else { // this only happens when the client is using a negative timenudge, because that @@ -304,7 +304,7 @@ Move a client back to where he was before the time shift ent->client->saved.leveltime = 0; // this will recalculate absmin and absmax - trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + trap_LinkEntity(ent); } } */ diff --git a/reaction/code/game/g_utils.c b/reaction/code/game/g_utils.c index 758f96f6..ab7f4665 100644 --- a/reaction/code/game/g_utils.c +++ b/reaction/code/game/g_utils.c @@ -649,7 +649,7 @@ gentity_t *G_TempEntity(vec3_t origin, int event) G_SetOrigin(e, snapped); // find cluster for PVS - trap_RQ3LinkEntity(e, __LINE__, __FILE__); + trap_LinkEntity(e); return e; } @@ -678,7 +678,7 @@ gentity_t *G_TempEntity2(vec3_t origin, int event, int eParm) G_SetOrigin(e, snapped); // find cluster for PVS - trap_RQ3LinkEntity(e, __LINE__, __FILE__); + trap_LinkEntity(e); return e; } diff --git a/reaction/code/game/g_weapon.c b/reaction/code/game/g_weapon.c index 7b4b584f..240bb080 100644 --- a/reaction/code/game/g_weapon.c +++ b/reaction/code/game/g_weapon.c @@ -889,7 +889,7 @@ void weapon_railgun_fire(gentity_t * ent) // link back in any entities we unlinked for (i = 0; i < unlinked; i++) { - trap_RQ3LinkEntity(unlinkedEntities[i], __LINE__, __FILE__); + trap_LinkEntity(unlinkedEntities[i]); } // the final trace endpos will be the terminal point of the rail trail @@ -1431,7 +1431,7 @@ void Weapon_SSG3000_Fire(gentity_t * ent) // link back in any entities we unlinked for (i = 0; i < unlinked; i++) { - trap_RQ3LinkEntity(unlinkedEntities[i], __LINE__, __FILE__); + trap_LinkEntity(unlinkedEntities[i]); } // snap the endpos to integers to save net bandwidth, but nudged towards the line @@ -1967,7 +1967,7 @@ void Laser_Think(gentity_t * self) vectoangles(tr.plane.normal, self->s.angles); - trap_RQ3LinkEntity(self, __LINE__, __FILE__); + trap_LinkEntity(self); //Prep next move self->nextthink = level.time + 10; diff --git a/reaction/cross-make-mingw.sh b/reaction/cross-make-mingw.sh index 92a75846..abf8fdd5 100755 --- a/reaction/cross-make-mingw.sh +++ b/reaction/cross-make-mingw.sh @@ -1,5 +1,6 @@ #!/bin/sh +export ARCH=x86 export CC=i686-pc-mingw32-gcc export WINDRES=i686-pc-mingw32-windres export PLATFORM=mingw32