int eval_cursor_trace_endpos;
int eval_cursor_trace_ent;
int eval_colormod;
+int eval_playermodel;
+int eval_playerskin;
mfunction_t *SV_PlayerPhysicsQC;
mfunction_t *EndFrameQC;
eval_cursor_trace_endpos = FindFieldOffset("cursor_trace_endpos");
eval_cursor_trace_ent = FindFieldOffset("cursor_trace_ent");
eval_colormod = FindFieldOffset("colormod");
+ eval_playermodel = FindFieldOffset("playermodel");
+ eval_playerskin = FindFieldOffset("playerskin");
// LordHavoc: allowing QuakeC to override the player movement code
SV_PlayerPhysicsQC = ED_FindFunction ("SV_PlayerPhysics");
e->v->netname = PR_SetString(svs.clients[num].name);
if ((val = GETEDICTFIELDVALUE(e, eval_clientcolors)))
val->_float = svs.clients[num].colors;
+ // NEXUIZ_PLAYERMODEL and NEXUIZ_PLAYERSKIN
+ if( eval_playermodel )
+ GETEDICTFIELDVALUE(host_client->edict, eval_playermodel)->string = PR_SetString(svs.clients[num].playermodel);
+ if( eval_playerskin )
+ GETEDICTFIELDVALUE(host_client->edict, eval_playerskin)->string = PR_SetString(svs.clients[num].playerskin);
}
}
Con_DPrintf("ED_ParseEpair: Can't find field %s\n", s);
return false;
}
- //val->_int = G_INT(def->ofs); AK Please check this - seems to be an org. quake bug
+ //val->_int = G_INT(def->ofs); // AK Please check this - seems to be an org. quake bug
val->_int = def->ofs;
break;
{ev_vector, "cursor_trace_endpos"},
{ev_vector, "cursor_trace_start"},
{ev_vector, "movement"},
- {ev_vector, "punchvector"}
+ {ev_vector, "punchvector"},
+ {ev_string, "playermodel"},
+ {ev_string, "playerskin"}
};
/*
===============
*/
extern void PR_Cmd_Reset (void);
-void PR_LoadProgs (void)
+void PR_LoadProgs (const char *progsname)
{
int i;
dstatement_t *st;
ddef_t *infielddefs;
dfunction_t *dfunctions;
+ if (!progsname || !*progsname)
+ Host_Error("PR_LoadProgs: passed empty progsname");
+
// flush the non-C variable lookup cache
for (i=0 ; i<GEFV_CACHESIZE ; i++)
gefvCache[i].field[0] = 0;
Mem_EmptyPool(progs_mempool);
Mem_EmptyPool(edictstring_mempool);
- progs = (dprograms_t *)FS_LoadFile ("progs.dat", progs_mempool, false);
+ progs = (dprograms_t *)FS_LoadFile (progsname, progs_mempool, false);
if (!progs)
- Host_Error ("PR_LoadProgs: couldn't load progs.dat");
+ Host_Error ("PR_LoadProgs: couldn't load %s", progsname);
Con_DPrintf("Programs occupy %iK.\n", fs_filesize/1024);