Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cg_t cg; // cg has the members assigned to the type cg_t varable which is the structure below.
- typedef struct {
- int clientFrame; // incremented each frame
- int clientNum;
- qboolean demoPlayback;
- qboolean levelShot; // taking a level menu screenshot
- int deferredPlayerLoading;
- qboolean loading; // don't defer players at initial startup
- qboolean intermissionStarted; // don't play voice rewards, because game will end shortly
- // there are only one or two snapshot_t that are relevent at a time
- int latestSnapshotNum; // the number of snapshots the client system has received
- int latestSnapshotTime; // the time from latestSnapshotNum, so we don't need to read the snapshot yet
- snapshot_t *snap; // cg.snap->serverTime <= cg.time
- snapshot_t *nextSnap; // cg.nextSnap->serverTime > cg.time, or NULL
- snapshot_t activeSnapshots[2];
- float frameInterpolation; // (float)( cg.time - cg.frame->serverTime ) / (cg.nextFrame->serverTime - cg.frame->serverTime)
- qboolean thisFrameTeleport;
- qboolean nextFrameTeleport;
- int frametime; // cg.time - cg.oldTime
- int time; // this is the time value that the client
- // is rendering at.
- int oldTime; // time at last frame, used for missile trails and prediction checking
- int physicsTime; // either cg.snap->time or cg.nextSnap->time
- int timelimitWarnings; // 5 min, 1 min, overtime
- int fraglimitWarnings;
- qboolean mapRestart; // set on a map restart to set back the weapon
- qboolean renderingThirdPerson; // during deaths, chasecams, etc
- // prediction state
- qboolean hyperspace; // true if prediction has hit a trigger_teleport
- playerState_t predictedPlayerState;
- centity_t predictedPlayerEntity;
- qboolean validPPS; // clear until the first call to CG_PredictPlayerState
- int predictedErrorTime;
- vec3_t predictedError;
- int eventSequence;
- int predictableEvents[MAX_PREDICTED_EVENTS];
- float stepChange; // for stair up smoothing
- int stepTime;
- float duckChange; // for duck viewheight smoothing
- int duckTime;
- float landChange; // for landing hard
- int landTime;
- // input state sent to server
- int weaponSelect;
- // auto rotating items
- vec3_t autoAngles;
- vec3_t autoAxis[3];
- vec3_t autoAnglesFast;
- vec3_t autoAxisFast[3];
- // view rendering
- refdef_t refdef;
- vec3_t refdefViewAngles; // will be converted to refdef.viewaxis
- // zoom key
- qboolean zoomed;
- int zoomTime;
- float zoomSensitivity;
- // information screen text during loading
- char infoScreenText[MAX_STRING_CHARS];
- // scoreboard
- int scoresRequestTime;
- int numScores;
- int selectedScore;
- int teamScores[2];
- score_t scores[MAX_CLIENTS];
- qboolean showScores;
- qboolean scoreBoardShowing;
- int scoreFadeTime;
- char killerName[MAX_NAME_LENGTH];
- char spectatorList[MAX_STRING_CHARS]; // list of names
- int spectatorLen; // length of list
- float spectatorWidth; // width in device units
- int spectatorTime; // next time to offset
- int spectatorPaintX; // current paint x
- int spectatorPaintX2; // current paint x
- int spectatorOffset; // current offset from start
- int spectatorPaintLen; // current offset from start
- // skull trails
- skulltrail_t skulltrails[MAX_CLIENTS];
- // centerprinting
- int centerPrintTime;
- int centerPrintCharWidth;
- int centerPrintY;
- char centerPrint[1024];
- int centerPrintLines;
- // low ammo warning state
- int lowAmmoWarning; // 1 = low, 2 = empty
- // kill timers for carnage reward
- int lastKillTime;
- // crosshair client ID
- int crosshairClientNum;
- int crosshairClientTime;
- // powerup active flashing
- int powerupActive;
- int powerupTime;
- // attacking player
- int attackerTime;
- int voiceTime;
- // reward medals
- int rewardStack;
- int rewardTime;
- int rewardCount[MAX_REWARDSTACK];
- qhandle_t rewardShader[MAX_REWARDSTACK];
- qhandle_t rewardSound[MAX_REWARDSTACK];
- // sound buffer mainly for announcer sounds
- int soundBufferIn;
- int soundBufferOut;
- int soundTime;
- qhandle_t soundBuffer[MAX_SOUNDBUFFER];
- // for voice chat buffer
- int voiceChatTime;
- int voiceChatBufferIn;
- int voiceChatBufferOut;
- // warmup countdown
- int warmup;
- int warmupCount;
- //==========================
- int itemPickup;
- int itemPickupTime;
- int itemPickupBlendTime; // the pulse around the crosshair is timed seperately
- int weaponSelectTime;
- int weaponAnimation;
- int weaponAnimationTime;
- // blend blobs
- float damageTime;
- float damageX, damageY, damageValue;
- // status bar head
- float headYaw;
- float headEndPitch;
- float headEndYaw;
- int headEndTime;
- float headStartPitch;
- float headStartYaw;
- int headStartTime;
- // view movement
- float v_dmg_time;
- float v_dmg_pitch;
- float v_dmg_roll;
- vec3_t kick_angles; // weapon kicks
- vec3_t kick_origin;
- // temp working variables for player view
- float bobfracsin;
- int bobcycle;
- float xyspeed;
- int nextOrbitTime;
- //qboolean cameraMode; // if rendering from a loaded camera
- // development tool
- refEntity_t testModelEntity;
- char testModelName[MAX_QPATH];
- qboolean testGun;
- } cg_t;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement