mirror of
https://github.com/UberGames/RPG-X2.git
synced 2025-02-07 15:31:03 +00:00
removed clientnumber frum lua_prints and slimmed them
found the issue that was likely causing the error on the stasis-door (trap_LinkEntity) but now it causes a signal caught. Signed-off-by: Harry Young <hendrik.gerritzen@googlemail.com>
This commit is contained in:
parent
b81b1875ab
commit
03f3b522cc
2 changed files with 15 additions and 24 deletions
|
@ -3631,8 +3631,6 @@ void spawn_trigger_stasis_door( gentity_t *ent ) {
|
|||
vec3_t mins, maxs;
|
||||
int i, best;
|
||||
|
||||
if(!ent) return;
|
||||
if(ent->wait == -1) return; // we don't want this for toggle only, do we?
|
||||
|
||||
// find the bounds of everything on the team
|
||||
VectorCopy (ent->r.absmin, mins);
|
||||
|
@ -3650,9 +3648,8 @@ void spawn_trigger_stasis_door( gentity_t *ent ) {
|
|||
}
|
||||
}
|
||||
|
||||
maxs[best] += 128;
|
||||
mins[best] -= 128;
|
||||
|
||||
maxs[best] += 128;
|
||||
mins[best] -= 128;
|
||||
|
||||
// create a trigger with this size
|
||||
other = G_Spawn ();
|
||||
|
@ -3661,9 +3658,12 @@ void spawn_trigger_stasis_door( gentity_t *ent ) {
|
|||
other->parent = ent;
|
||||
other->r.contents = CONTENTS_TRIGGER;
|
||||
other->touch = touch_stasis_door;
|
||||
ent->nextthink = -1;
|
||||
other->nextthink = -1;
|
||||
|
||||
trap_LinkEntity (other);
|
||||
G_Printf( "^1Spawnage complete\n", 0 );
|
||||
|
||||
|
||||
}
|
||||
|
||||
//-------------------------------------------
|
||||
|
@ -3708,7 +3708,7 @@ void SP_func_stasis_door( gentity_t *ent )
|
|||
|
||||
ent->use = use_stasis_door;
|
||||
//ent->flags |= SVF_STASIS_DOOR;
|
||||
ent->count = 3;
|
||||
ent->count = 1;
|
||||
if (!ent->wait)
|
||||
{
|
||||
ent->wait = 5;
|
||||
|
|
|
@ -16,7 +16,7 @@ static int Game_Print(lua_State *L) {
|
|||
|
||||
LUA_DEBUG("Game_Print - start: ");
|
||||
|
||||
for(i = 1; i <= n; i++)
|
||||
for(i = 1; i < n; i++)
|
||||
{
|
||||
const char *s;
|
||||
|
||||
|
@ -56,7 +56,7 @@ static int Game_CenterPrint(lua_State *L) {
|
|||
|
||||
LUA_DEBUG("Game_CenterPrint - start: ");
|
||||
|
||||
for(i = 1; i <= n; i++)
|
||||
for(i = 1; i < n; i++)
|
||||
{
|
||||
const char *s;
|
||||
|
||||
|
@ -76,12 +76,8 @@ static int Game_CenterPrint(lua_State *L) {
|
|||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
if(clNum != -1 && clNum >= 0 && clNum < level.maxclients)
|
||||
trap_SendServerCommand(clNum, va("servercprint \"" S_COLOR_WHITE "%s\n\"", buf));
|
||||
else {
|
||||
for(i = 0; i < level.maxclients; i++)
|
||||
trap_SendServerCommand(i, va("servercprint \"" S_COLOR_WHITE "%s\n\"", buf));
|
||||
}
|
||||
|
||||
trap_SendServerCommand(clNum, va("servercprint \"" S_COLOR_WHITE "%s\n\"", buf));
|
||||
|
||||
LUA_DEBUG("Game_CenterPrint - return: printed string");
|
||||
return 0;
|
||||
|
@ -102,7 +98,7 @@ static int Game_ClientPrint(lua_State *L) {
|
|||
|
||||
LUA_DEBUG("Game_ClientPrint - start: ");
|
||||
|
||||
for(i = 1; i <= n; i++) {
|
||||
for(i = 1; i < n; i++) {
|
||||
const char *s;
|
||||
|
||||
lua_pushvalue(L, -1);
|
||||
|
@ -145,14 +141,14 @@ static int Game_MessagePrint(lua_State *L) {
|
|||
|
||||
LUA_DEBUG("Game_MessagePrint - start: ");
|
||||
|
||||
for(i = 1; i <= n; i++)
|
||||
for(i = 1; i < n; i++)
|
||||
{
|
||||
const char *s;
|
||||
|
||||
lua_pushvalue(L, -1);
|
||||
lua_pushvalue(L, i);
|
||||
lua_call(L, 1, 1);
|
||||
s = lua_tostring(L, -1);
|
||||
s = lua_tostring(L, 2);
|
||||
|
||||
if(s == NULL)
|
||||
{
|
||||
|
@ -165,12 +161,7 @@ static int Game_MessagePrint(lua_State *L) {
|
|||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
if(clNum != -1 && clNum >= 0 && clNum < level.maxclients)
|
||||
trap_SendServerCommand(clNum, va("servermsg \"" S_COLOR_WHITE "%s\n\"", buf));
|
||||
else {
|
||||
for(i = 0; i < level.maxclients; i++)
|
||||
trap_SendServerCommand(i, va("servermsg \"" S_COLOR_WHITE "%s\n\"", buf));
|
||||
}
|
||||
trap_SendServerCommand(clNum, va("servermsg \"" S_COLOR_WHITE "%s\n\"", buf));
|
||||
|
||||
LUA_DEBUG("Game_MessagePrint - return: printed string");
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue