From 25261e3ac261e668e87420ef99caca5003583ca2 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Sun, 14 Sep 2008 00:36:01 +0000 Subject: [PATCH] shadow culling based on line of sight for players git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2577 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/rendermodel.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/src/rendermodel.cpp b/source/src/rendermodel.cpp index f55e7ff8..62c5bf8c 100644 --- a/source/src/rendermodel.cpp +++ b/source/src/rendermodel.cpp @@ -324,6 +324,13 @@ void rendermodel(const char *mdl, int anim, int tex, float rad, const vec &o, fl if(isoccluded(camera1->o.x, camera1->o.y, o.x-rad, o.y-rad, rad*2)) return; } + if(stenciling && d && !raycubelos(camera1->o, o, d->radius)) + { + vec target(o); + target.z += d->dyneyeheight(); + if(!raycubelos(camera1->o, target, d->radius)) return; + } + int varseed = 0; if(d) switch(anim&ANIM_INDEX) {