MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / DoPlayerFrame

Function DoPlayerFrame

Descent3/Player.cpp:1970–1992  ·  view source on GitHub ↗

Do player automatic frame (all player automatic actions) Does all player, single or multiplayer games

Source from the content-addressed store, hash-verified

1968// Do player automatic frame (all player automatic actions)
1969// Does all player, single or multiplayer games
1970void DoPlayerFrame() {
1971 if (Demo_flags == DF_PLAYBACK) {
1972 for (int i = 0; i < MAX_PLAYERS; i++) {
1973 if (Objects[Players[i].objnum].id != i)
1974 continue;
1975 if (Objects[Players[i].objnum].type == OBJ_GHOST)
1976 continue;
1977
1978 DoPlayerFrameForOne(i);
1979 }
1980
1981 } else if (Game_mode & GM_MULTI) {
1982 for (int i = 0; i < MAX_NET_PLAYERS; i++) {
1983 if (!(NetPlayers[i].flags & NPF_CONNECTED))
1984 continue;
1985
1986 DoPlayerFrameForOne(i);
1987 }
1988
1989 } else {
1990 DoPlayerFrameForOne(Player_num);
1991 }
1992}
1993
1994// This function performs the death roll for a player.
1995#define MIN_DEATHCAM_DIST 40.0f

Callers 1

GameFrameFunction · 0.85

Calls 1

DoPlayerFrameForOneFunction · 0.85

Tested by

no test coverage detected