VectorAdd(PRVM_serveredictvector(viewee, origin), PRVM_serveredictvector(viewee, maxs), ma);
#if 1
- if(!sv.worldmodel->brush.GetPVS || !sv.worldmodel->brush.BoxTouchingPVS)
+ if(!cl.worldmodel || !cl.worldmodel->brush.GetPVS || !cl.worldmodel->brush.BoxTouchingPVS)
{
// no PVS support on this worldmodel... darn
PRVM_G_FLOAT(OFS_RETURN) = 3;
return;
}
- pvs = sv.worldmodel->brush.GetPVS(sv.worldmodel, viewpos);
+ pvs = cl.worldmodel->brush.GetPVS(cl.worldmodel, viewpos);
if(!pvs)
{
// viewpos isn't in any PVS... darn
PRVM_G_FLOAT(OFS_RETURN) = 2;
return;
}
- PRVM_G_FLOAT(OFS_RETURN) = sv.worldmodel->brush.BoxTouchingPVS(sv.worldmodel, pvs, mi, ma);
+ PRVM_G_FLOAT(OFS_RETURN) = cl.worldmodel->brush.BoxTouchingPVS(cl.worldmodel, pvs, mi, ma);
#else
// using fat PVS like FTEQW does (slow)
- if(!sv.worldmodel->brush.FatPVS || !sv.worldmodel->brush.BoxTouchingPVS)
+ if(!cl.worldmodel || !cl.worldmodel->brush.FatPVS || !cl.worldmodel->brush.BoxTouchingPVS)
{
// no PVS support on this worldmodel... darn
PRVM_G_FLOAT(OFS_RETURN) = 3;
return;
}
- fatpvsbytes = sv.worldmodel->brush.FatPVS(sv.worldmodel, viewpos, 8, fatpvs, sizeof(fatpvs), false);
+ fatpvsbytes = cl.worldmodel->brush.FatPVS(cl.worldmodel, viewpos, 8, fatpvs, sizeof(fatpvs), false);
if(!fatpvsbytes)
{
// viewpos isn't in any PVS... darn
PRVM_G_FLOAT(OFS_RETURN) = 2;
return;
}
- PRVM_G_FLOAT(OFS_RETURN) = sv.worldmodel->brush.BoxTouchingPVS(sv.worldmodel, fatpvs, mi, ma);
+ PRVM_G_FLOAT(OFS_RETURN) = cl.worldmodel->brush.BoxTouchingPVS(cl.worldmodel, fatpvs, mi, ma);
#endif
}
}
#if 1
- if(!sv.worldmodel->brush.GetPVS || !sv.worldmodel->brush.BoxTouchingPVS)
+ if(!sv.worldmodel || !sv.worldmodel->brush.GetPVS || !sv.worldmodel->brush.BoxTouchingPVS)
{
// no PVS support on this worldmodel... darn
PRVM_G_FLOAT(OFS_RETURN) = 3;
PRVM_G_FLOAT(OFS_RETURN) = sv.worldmodel->brush.BoxTouchingPVS(sv.worldmodel, pvs, PRVM_serveredictvector(viewee, absmin), PRVM_serveredictvector(viewee, absmax));
#else
// using fat PVS like FTEQW does (slow)
- if(!sv.worldmodel->brush.FatPVS || !sv.worldmodel->brush.BoxTouchingPVS)
+ if(!sv.worldmodel || !sv.worldmodel->brush.FatPVS || !sv.worldmodel->brush.BoxTouchingPVS)
{
// no PVS support on this worldmodel... darn
PRVM_G_FLOAT(OFS_RETURN) = 3;