Added A_SetViewPos(Vector3 Offset, int Flags = -1)
- Offset: The offset from the actor's view to move the camera about. - Flags: (Default is -1, which means don't change flags) - VPSF_ABSOLUTEOFFSET: Don't include actor angles in calculation. - VPSF_ABSOLUTEPOS: Position is absolute, and disables all transformations. Modders are responsible for being portal aware! Notes: - `ViewPos` in Actor will be `null` until A_SetViewPos is called for the first time. **Issues:** - Hiding sprite while in portal incomplete.
This commit is contained in:
parent
cd33fb8607
commit
4e8d59951b
10 changed files with 283 additions and 29 deletions
|
|
@ -734,6 +734,12 @@ void HWSprite::Process(HWDrawInfo *di, AActor* thing, sector_t * sector, area_t
|
|||
DVector3 thingorigin = thing->Pos();
|
||||
if (thruportal == 1) thingorigin += di->Level->Displacements.getOffset(thing->Sector->PortalGroup, sector->PortalGroup);
|
||||
if (fabs(thingorigin.X - vp.ActorPos.X) < 2 && fabs(thingorigin.Y - vp.ActorPos.Y) < 2) return;
|
||||
|
||||
// Try to do an inverted trace to get to the camera's body. This way, we know exactly behind which line to disable.
|
||||
// Currently doesn't work.
|
||||
FViewPosition *vpos = camera->ViewPos;
|
||||
if (vpos && vpos->TraceBack(camera))
|
||||
return;
|
||||
}
|
||||
// Thing is invisible if close to the camera.
|
||||
if (thing->renderflags & RF_MAYBEINVISIBLE)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue