fs_offset_t csprogsdatasize;
int csprogsdatacrc, requiredcrc;
int requiredsize;
+ prvm_eval_t *val;
// reset csqc_progcrc after reading it, so that changing servers doesn't
// expect csqc on the next server
prog->globals.client->mapname = PRVM_SetEngineString(cl.worldmodel->name);
prog->globals.client->player_localentnum = cl.playerentity;
+ // set map description (use world entity 0)
+ val = PRVM_EDICTFIELDVALUE(prog->edicts, prog->fieldoffsets.message);
+ if(val)
+ val->string = PRVM_SetEngineString(cl.levelname);
+
// call the prog init
PRVM_ExecuteProgram(prog->funcoffsets.CSQC_Init, "QC function CSQC_Init is missing");
prog->fieldoffsets.items2 = PRVM_ED_FindFieldOffset("items2");
prog->fieldoffsets.lerpfrac = PRVM_ED_FindFieldOffset("lerpfrac");
prog->fieldoffsets.light_lev = PRVM_ED_FindFieldOffset("light_lev");
+ prog->fieldoffsets.message = PRVM_ED_FindFieldOffset("message");
prog->fieldoffsets.modelflags = PRVM_ED_FindFieldOffset("modelflags");
prog->fieldoffsets.movement = PRVM_ED_FindFieldOffset("movement");
prog->fieldoffsets.netaddress = PRVM_ED_FindFieldOffset("netaddress");