Skip to content

Commit

Permalink
- start creating basic structures for actor sync
Browse files Browse the repository at this point in the history
  • Loading branch information
Rachael Alexanderson committed Apr 19, 2018
1 parent 3e33804 commit b7c711b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/actor.h
Expand Up @@ -48,6 +48,8 @@
#include "tflags.h"
#include "portal.h"

#include "d_netsync.h"

struct subsector_t;
struct FBlockNode;
struct FPortalGroupArray;
Expand Down Expand Up @@ -635,6 +637,9 @@ class AActor : public DThinker
AActor &operator= (const AActor &other);
~AActor ();

NetSyncData syncdata;
NetSyncData synccompare;

virtual void Finalize(FStateDefinitions &statedef);
virtual void OnDestroy() override;
virtual void Serialize(FSerializer &arc) override;
Expand Down
33 changes: 33 additions & 0 deletions src/d_netsync.h
@@ -0,0 +1,33 @@
#ifndef __D_NETSYNC_H__
#define __D_NETSYNC_H__

struct NetSyncData {
DVector3 Pos;
DVector3 Vel;
DAngle SpriteAngle;
DAngle SpriteRotation;
DRotator Angles;
DVector2 Scale; // Scaling values; 1 is normal size
double Alpha; // Since P_CheckSight makes an alpha check this can't be a float. It has to be a double.
int sprite; // used to find patch_t and flip value
uint8_t frame; // sprite frame to draw
uint8_t effects; // [RH] see p_effect.h
FRenderStyle RenderStyle; // Style to draw this actor with
uint32_t Translation;
uint32_t RenderRequired; // current renderer must have this feature set
uint32_t RenderHidden; // current renderer must *not* have any of these features
ActorRenderFlags renderflags; // Different rendering flags
double Floorclip; // value to use for floor clipping
DAngle VisibleStartAngle;
DAngle VisibleStartPitch;
DAngle VisibleEndAngle;
DAngle VisibleEndPitch;
double Speed;
double FloatSpeed;
double CameraHeight; // Height of camera when used as such
double CameraFOV;
double StealthAlpha; // Minmum alpha for MF_STEALTH.

};

#endif //__D_NETSYNC_H__

0 comments on commit b7c711b

Please sign in to comment.