-
Notifications
You must be signed in to change notification settings - Fork 22
Proof of concept adding trigger_coop #239
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
Conversation
- Added CEntityFactoryDictionary signatures and functions to map new classnames to existing ones. - Added CBaseTrigger::IsTouching(CBaseEntity *) offset and function to make it easier to determine if a player is touching a trigger. The new signatures and offsets have not be fully tested on Windows and HL2MP which will need to be tested/adjusted before merging.
|
As for testing, I used bm_c1a0b |
Re-enabled `SetUserData` and `GetUserData` for CBaseEntity and made it so nothing is created or initialized unless accessed. Through the SetUserData and GetUserData functionality, trigger_coop now has PlayerValue, CountType, and UseHud using the new properties.
|
LMK when it's ready, I'll test it and polish the edges. Or if you'd prefer a review instead that's fine too. Might even add a .fgd |
Tested Black Mesa Windows and the only signature I can't seem to get working is InstallFactory(). Tried HL2MP, but none of the several signatures I tried are working correctly so I haven't included them here.
|
Which ever you prefer. I haven't been able to get the signature for InstallFactory working on Windows yet, and HL2MP signatures I have tried aren't working correctly. |
|
There's a GetEntityFactoryDictionary method in This means we should be able to forgo signatures entirely and use quite stable offsets. |
Alienmario
left a comment
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.
The outputs to game_text don't seem to be working at the moment, will have to check it later.
|
Currently I'm seeing 2 issues:
|
Alienmario
left a comment
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.
Going to finish this one off.
|
I think it's looking pretty good. See if you can find any shortcomings. The test case is also working now, had to return |
ampreeT
left a comment
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.
Looks good except for a few issues while testing on Windows:
- Max player count is off by 1
- Checkpoint EDT does not work for
OnAllPlayersIn(did not check other outputs)
bm_c1a0a edt:
"modify"
{
"targetname" "LCS_AM_Airlock_trigger"
"classname" "trigger_once"
"set"
{
"classname" "trigger_coop"
}
"outputs"
{
"modify"
{
"output" "OnTrigger"
"replace"
{
"output" "OnAllPlayersIn"
}
}
"add"
{
"output" "OnAllPlayersIn"
"target" "!self"
"input" "Disable"
}
}
}"door1"
{
"origin" "272 28 520"
"angles" "0.0 90.0 0.0"
"delay" "0.35"
"triggerid" "LCS_AM_Airlock_trigger"
"output" "OnAllPlayersIn"
"bringall" "1"
}
That's probably correct. Assuming you spawned with PlayerValue 50 - that's 50% of all alive players -> 3 * 0.5 = 2 after rounding.
Looks like output hooks won't work unless we can support adding new datamaps, on which I'm doubtful. |
|
In the interim I've added support for remapped outputs in checkpoints. If we ever want to support custom entities properly, including datamaps, making a fork of this extension ought to be the sanest way. |
ampreeT
left a comment
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.
Looks good to me
|
Thanks for starting this, @Balimbanana! |
The new signatures and offsets have not be fully tested on Windows and HL2MP which will need to be tested/adjusted before merging.