Cleaning up implementation of isometric camera with optional orthographic projection.
All CVars, mapinfo variables, and playerinfo/playerpawn variables are gone. A Camera actor named 'SpectatorCamera' is defined in warsrc/static/zscript/actors/shared/camera.zs The following new flag bits were defined in the 'DViewPosition' struct for use with actor->ViewPos in src/playsim/actor.h: VPSF_ALLOWOUTOFBOUNDS = 1 << 3, // Allow viewpoint to go out of bounds (hardware renderer only). VPSF_ORTHOGRAPHIC = 1 << 4, // Use orthographic projection. VPSF_ISOMETRICSPRITES = 1 << 5, // Displace sprites towards camera and don't billboard (drawn from isometric perspective). Basically, spawn a SpectatorCamera actor with the appropriate flags and set it to player.camera. See example template: https://www.mediafire.com/file/fv8rytayjt9l6g1/isometric_actor_wads.zip/file Has been tested with multiplayer death and disconnection (and respawns). Not tested with portals. Still only works with hardware renderer (mostly). But should be compatible with older mods and libraries.
This commit is contained in:
parent
a9c567ab9b
commit
25f1407228
16 changed files with 80 additions and 148 deletions
|
|
@ -270,7 +270,6 @@ void player_t::CopyFrom(player_t &p, bool copyPSP)
|
|||
deltaviewheight = p.deltaviewheight;
|
||||
bob = p.bob;
|
||||
Vel = p.Vel;
|
||||
isoyaw = p.isoyaw;
|
||||
centering = p.centering;
|
||||
turnticks = p.turnticks;
|
||||
attackdown = p.attackdown;
|
||||
|
|
@ -1636,7 +1635,6 @@ void player_t::Serialize(FSerializer &arc)
|
|||
("deltaviewheight", deltaviewheight)
|
||||
("bob", bob)
|
||||
("vel", Vel)
|
||||
("isoyaw", isoyaw)
|
||||
("centering", centering)
|
||||
("health", health)
|
||||
("inventorytics", inventorytics)
|
||||
|
|
@ -1744,7 +1742,6 @@ DEFINE_FIELD_X(PlayerInfo, player_t, viewheight)
|
|||
DEFINE_FIELD_X(PlayerInfo, player_t, deltaviewheight)
|
||||
DEFINE_FIELD_X(PlayerInfo, player_t, bob)
|
||||
DEFINE_FIELD_X(PlayerInfo, player_t, Vel)
|
||||
DEFINE_FIELD_X(PlayerInfo, player_t, isoyaw)
|
||||
DEFINE_FIELD_X(PlayerInfo, player_t, centering)
|
||||
DEFINE_FIELD_X(PlayerInfo, player_t, turnticks)
|
||||
DEFINE_FIELD_X(PlayerInfo, player_t, attackdown)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue