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
|
|
@ -369,6 +369,7 @@ void AActor::Serialize(FSerializer &arc)
|
|||
A("spawnorder", SpawnOrder)
|
||||
A("friction", Friction)
|
||||
A("SpriteOffset", SpriteOffset)
|
||||
("viewpos", ViewPos)
|
||||
A("userlights", UserLights);
|
||||
|
||||
SerializeTerrain(arc, "floorterrain", floorterrain, &def->floorterrain);
|
||||
|
|
@ -4952,6 +4953,12 @@ void AActor::OnDestroy ()
|
|||
UnlinkFromWorld (nullptr);
|
||||
flags |= MF_NOSECTOR|MF_NOBLOCKMAP;
|
||||
|
||||
if (ViewPos != nullptr)
|
||||
{
|
||||
ViewPos->Destroy();
|
||||
ViewPos = nullptr;
|
||||
}
|
||||
|
||||
// Transform any playing sound into positioned, non-actor sounds.
|
||||
S_RelinkSound (this, NULL);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue