continue;
}
+ if (prog->funcoffsets.SV_OnEntityPreSpawnFunction)
+ {
+ // self = ent
+ PRVM_GLOBALFIELDVALUE(prog->globaloffsets.self)->edict = PRVM_EDICT_TO_PROG(ent);
+ PRVM_ExecuteProgram (prog->funcoffsets.SV_OnEntityPreSpawnFunction, "QC function SV_OnEntityPreSpawnFunction is missing");
+ }
+
//
// immediately call spawn function, but only if there is a self global and a classname
//
+ if(!ent->priv.required->free)
if(prog->globaloffsets.self >= 0 && prog->fieldoffsets.classname >= 0)
{
string_t handle = PRVM_EDICTFIELDVALUE(ent, prog->fieldoffsets.classname)->string;
PRVM_ED_Print(ent, NULL);
}
PRVM_ED_Free (ent);
- continue;
+ continue; // not included in "inhibited" count
}
}
else
}
}
+ if(!ent->priv.required->free)
+ if (prog->funcoffsets.SV_OnEntityPostSpawnFunction)
+ {
+ // self = ent
+ PRVM_GLOBALFIELDVALUE(prog->globaloffsets.self)->edict = PRVM_EDICT_TO_PROG(ent);
+ PRVM_ExecuteProgram (prog->funcoffsets.SV_OnEntityPostSpawnFunction, "QC function SV_OnEntityPostSpawnFunction is missing");
+ }
+
spawned++;
if (ent->priv.required->free)
died++;
prog->fieldoffsets.frame1time = PRVM_ED_FindFieldOffset("frame1time");
prog->fieldoffsets.frame2 = PRVM_ED_FindFieldOffset("frame2");
prog->fieldoffsets.frame2time = PRVM_ED_FindFieldOffset("frame2time");
+ prog->fieldoffsets.shadertime = PRVM_ED_FindFieldOffset("shadertime");
prog->fieldoffsets.fullbright = PRVM_ED_FindFieldOffset("fullbright");
prog->fieldoffsets.glow_color = PRVM_ED_FindFieldOffset("glow_color");
prog->fieldoffsets.glow_size = PRVM_ED_FindFieldOffset("glow_size");
prog->funcoffsets.SV_ParseClientCommand = PRVM_ED_FindFunctionOffset("SV_ParseClientCommand");
prog->funcoffsets.SV_PlayerPhysics = PRVM_ED_FindFunctionOffset("SV_PlayerPhysics");
prog->funcoffsets.SV_OnEntityNoSpawnFunction = PRVM_ED_FindFunctionOffset("SV_OnEntityNoSpawnFunction");
+ prog->funcoffsets.SV_OnEntityPreSpawnFunction = PRVM_ED_FindFunctionOffset("SV_OnEntityPreSpawnFunction");
+ prog->funcoffsets.SV_OnEntityPostSpawnFunction = PRVM_ED_FindFunctionOffset("SV_OnEntityPostSpawnFunction");
prog->funcoffsets.GameCommand = PRVM_ED_FindFunctionOffset("GameCommand");
prog->funcoffsets.SV_Shutdown = PRVM_ED_FindFunctionOffset("SV_Shutdown");
prog->funcoffsets.URI_Get_Callback = PRVM_ED_FindFunctionOffset("URI_Get_Callback");
+ prog->funcoffsets.SV_PausedTic = PRVM_ED_FindFunctionOffset("SV_PausedTic");
prog->globaloffsets.SV_InitCmd = PRVM_ED_FindGlobalOffset("SV_InitCmd");
prog->globaloffsets.self = PRVM_ED_FindGlobalOffset("self");
prog->globaloffsets.time = PRVM_ED_FindGlobalOffset("time");
prog->globaloffsets.drawfont = PRVM_ED_FindGlobalOffset("drawfont");
prog->globaloffsets.require_spawnfunc_prefix = PRVM_ED_FindGlobalOffset("require_spawnfunc_prefix");
prog->globaloffsets.worldstatus = PRVM_ED_FindGlobalOffset("worldstatus");
+ prog->globaloffsets.servertime = PRVM_ED_FindGlobalOffset("servertime");
+ prog->globaloffsets.serverprevtime = PRVM_ED_FindGlobalOffset("serverprevtime");
+ prog->globaloffsets.serverdeltatime = PRVM_ED_FindGlobalOffset("serverdeltatime");
+ prog->globaloffsets.gettaginfo_name = PRVM_ED_FindGlobalOffset("gettaginfo_name");
+ prog->globaloffsets.gettaginfo_parent = PRVM_ED_FindGlobalOffset("gettaginfo_parent");
+ prog->globaloffsets.gettaginfo_offset = PRVM_ED_FindGlobalOffset("gettaginfo_offset");
+ prog->globaloffsets.gettaginfo_forward = PRVM_ED_FindGlobalOffset("gettaginfo_forward");
+ prog->globaloffsets.gettaginfo_right = PRVM_ED_FindGlobalOffset("gettaginfo_right");
+ prog->globaloffsets.gettaginfo_up = PRVM_ED_FindGlobalOffset("gettaginfo_up");
// menu qc only uses some functions, nothing else
prog->funcoffsets.m_draw = PRVM_ED_FindFunctionOffset("m_draw");
{
if (developer.integer >= 100)
Con_Printf("PRVM_SetTempString: enlarging tempstrings buffer (%iKB -> %iKB)\n", old.maxsize/1024, vm_tempstringsbuf.maxsize/1024);
- vm_tempstringsbuf.data = Mem_Alloc(sv_mempool, vm_tempstringsbuf.maxsize);
+ vm_tempstringsbuf.data = (unsigned char *) Mem_Alloc(sv_mempool, vm_tempstringsbuf.maxsize);
if (old.cursize)
memcpy(vm_tempstringsbuf.data, old.data, old.cursize);
if (old.data)
for (i = 0; i < (int)Mem_ExpandableArray_IndexRange(&prog->stringbuffersarray); ++i)
{
- prvm_stringbuffer_t *stringbuffer = Mem_ExpandableArray_RecordAtIndex(&prog->stringbuffersarray, i);
+ prvm_stringbuffer_t *stringbuffer = (prvm_stringbuffer_t*) Mem_ExpandableArray_RecordAtIndex(&prog->stringbuffersarray, i);
if(stringbuffer)
if(stringbuffer->origin)
{