port: net: basic networking with barely working position sync

This commit is contained in:
fgsfds committed 2023-12-17 12:54:48 +01:00
1 parent 0a7faf2409
commit 6fc99e4c23
47 files changed
+7500 -101

No files matched your search

+10
View File
@@ -28,6 +28,7 @@
#define MAX_ROOMPROPLISTCHUNKS 256
#define MAX_SQUADRONS 16
#define MAX_TEAMS 8
#define MAX_PLAYERNAME 15
#define NUM_BOTDIFFS 6
#define NUM_CYCLEABLE_WEAPONS 45
@@ -695,6 +696,7 @@
#define CONTROLMODE_23 6
#define CONTROLMODE_24 7
#define CONTROLMODE_PC 8 // "pc port" controls; enabled in the .ini file
#define CONTROLMODE_NA 9 // dummy controls for remote players
#define COUNTDOWNTIMERREASON_AI 0x01
#define COUNTDOWNTIMERREASON_NOCONTROL 0x10
@@ -4682,6 +4684,8 @@ enum weaponnum {
#define BUTTON_ACCEPT BUTTON_ACCEPT_WPNFORWARD
#define BUTTON_WPNFORWARD BUTTON_ACCEPT_WPNFORWARD
#define LOCALPLAYERCOUNT() PLAYERCOUNT()
#else
// xbla behavior
@@ -4713,6 +4717,12 @@ enum weaponnum {
#define CROUCHMODE_TOGGLE 2 // press the crouch buttons to toggle stance
#define CROUCHMODE_TOGGLE_ANALOG (CROUCHMODE_ANALOG | CROUCHMODE_TOGGLE)
#define NETMODE_NONE 0
#define NETMODE_SERVER 1
#define NETMODE_CLIENT 2
#define LOCALPLAYERCOUNT() (g_NetMode ? 1 : PLAYERCOUNT())
#endif
#endif
+1
View File
@@ -548,6 +548,7 @@ extern s32 g_BlurFbCapTimer;
extern bool g_BlurFbDirty;
extern s32 g_TickRateDiv;
extern s32 g_MusicDisableMpDeath;
extern s32 g_NetMode;
#define PLAYER_EXTCFG() g_PlayerExtCfg[g_Vars.currentplayerstats->mpindex & 3]
#define PLAYER_DEFAULT_FOV (PLAYER_EXTCFG().fovy)
+1
View File
@@ -203,6 +203,7 @@ bool chrAdjustPosForSpawn(f32 chrradius, struct coord *pos, RoomNum *rooms, f32
struct prop *chrSpawnAtCoord(s32 body, s32 head, struct coord *pos, RoomNum *room, f32 angle, u8 *ailist, u32 spawnflags);
bool chrIsPropPresetBlockingSightToTarget(struct chrdata *chr);
bool chrSetPos(struct chrdata *chr, struct coord *pos, RoomNum *rooms, f32 angle, bool findground);
bool chrMoveToPos(struct chrdata *chr, struct coord *pos, RoomNum *room, f32 angle, bool ignorebg);
bool chrCheckCoverOutOfSight(struct chrdata *chr, s32 covernum, bool soft);
s32 chrAssignCoverByCriteria(struct chrdata *chr, u16 arg1, s32 arg2);
+7 -1
View File
@@ -2820,6 +2820,9 @@ struct player {
/*0x1c72*/ s16 amdowntime; // for alt-modes, used like invdowntime and amdowntime
#ifndef PLATFORM_N64
/*0x1c74*/ f32 swivelpos[2];
/*0x1c84*/ u32 ucmd;
/*0x1c88*/ bool isremote;
/*0x1c8c*/ struct netclient *client;
#endif
};
@@ -4002,7 +4005,7 @@ struct gamefile {
};
struct mpchrconfig {
/*0x00*/ char name[15];
/*0x00*/ char name[MAX_PLAYERNAME];
/*0x0f*/ u8 mpheadnum;
/*0x10*/ u8 mpbodynum;
/*0x11*/ u8 team;
@@ -4046,6 +4049,9 @@ struct mpplayerconfig {
/*0x96*/ u8 newtitle;
/*0x97*/ u8 gunfuncs[6];
/*0x9d*/ u8 handicap;
#ifndef PLATFORM_N64
/*0x9e*/ struct netclient *client;
#endif
};
struct mpbotconfig {