-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
experimental 4player Counter / Co-Operative #389
Conversation
I'm having a look at the ailists for a hopefully cleaner solution and it's starting to look a lot more feasible than I thought it would. Having said that, having a list of all Something you'll want to consider is the |
Cycling the "current coop" player and basing the p1p2 toggle calculation based on MAX_PLAYERS and the current coop number number does make most things work. Like @fgsfdsfgs suggested CHR_COOP / CHR_P1P2_OPPOSITE references in the |
This allows all 4 players to be detected and targeted by enemy guards in coop
... but manually typed in see fgsfdsfgs#383
These work fine in the 2x2 split arrangement.
use currentcoopplayernum instead of coopplayernum p1p2_opposite: attempt to resolve a new player by subtractng the coopplayerindex from the max number of human coop buddies
untested with anti
...per waifu's suggestion
I have no clue who came up with 'Build Your Perfect Team", but I love it so much. This is not only extremely cool on a technical level, but on a creative one as well. |
revert: allyplayers was a bad idea
cf75ba3 should fix it if it's the same issue I encountered. |
|
bgunSetSightVisible(GUNSIGHTREASON_NOCONTROL, false); | ||
bgunSetGunAmmoVisible(GUNAMMOREASON_NOCONTROL, false); | ||
if (isChrPropCoop(chr->prop)) { | ||
struct playerpool** playerpool = getPlayerPool(CHR_COOP); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wtf I have no idea how this built and worked on Linux. I'll take a look when I'm on my computer next. Unblocks #389 (comment)
I'm closing this PR and taking it private until it's in a more stable state. |
Thanks for having a look at it. I wish I had any sort of knowledge to help. I'm trying to learn. |
4 player pvp missions
known issues
goals
Want to play 4player coop / anti with a mix of coop / anti team characters
No recompiling of ailists. Should "just work" with vanilla levels and well-formed mods.
Load mp profile for coop / anti characters for controller / hud settings / "leveling"
non-goals
background
In Vanilla PD, 'coopness' or 'antiness' of a PD session is controlled by setting
g_Vars.coopplayernum
andg_Vars.antiplayernum
This is used to determine if coop or anti is running, and what player index to use. Also, coop / anti logic is mutually exclusive.approach
Porting PD to 4 player local coop/anti requires is set via
g_MissionConfig.isteam
that allows players to join a solo mission as a team of coop or anti characters.g_MissionConfig.isteam
is set totrue
when the mission is a team mission.g_Vars.playerroles
is used to track player role constants against player slots. This is used byplayermgrAllocatePlayersFromRoles
to initialize the player slots and various control variables.g_Vars.currentplayer
is the current player struct.g_Vars.players
: player structs for all players.g_Vars.currentplayernum
is the current player numberg_Vars.coopplayers
: player structs for coop players. The bond slot is set to 0 as well as the anti players.g_Vars.currentcoopnum
is the current coop player number. On each frame the coop player is set to the next coop player struct that exists.g_Vars.coop
: current coop player structg_Vars.currentantinum
is the current anti player number. On each frame the anti player is set to the next anti player struct that existsg_Vars.antiplayers
: player structs for anti players. The anti index is set to 0 as well as the coop players.g_Vars.anti
: current anti player structIn order to gaurentee that ailist commands that are intending to reference
CHR_ANTI
,CHR_COOP
, andCHR_P1P2
/CHR_P1P2O
AIlist commands referencingCHR_COOP
orCHR_P1P2
will be treated as any or all coop / ally chaaracters.limitations
CHR_COOP
orCHR_P1P2
will need to be treated as any or all ally characters.This means that mission-related hud messages intended for one coop character will be sent to them all.
acknowledgements