Skip to content
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

WIP: vscript support #5

Merged
merged 10 commits into from
May 22, 2020

Conversation

reductor
Copy link
Collaborator

@reductor reductor commented May 15, 2020

Starting this PR to start the discussion/review while some remaining parts are left over

Remaining parts

  • FGD changes (WIP: vscript support source-fgds#1)
  • Documentation/Wiki related changes
  • Identify and document potential incompatibilities with ASW/CS:GO/Portal2 vscripts
  • Save and restore support
  • Easier primitive types

Copy link
Member

@Blixibon Blixibon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've left a few comments based on what I've found in this PR so far.

sp/src/game/server/baseentity.cpp Outdated Show resolved Hide resolved
// HACK: (03/25/09) Then the player goes across a transition it doesn't spawn and register
// it's instance. We're hacking around this for now, but this will go away when we get around to
// having entities cross transitions and keep their script state.
if ( !g_pGameRules->IsMultiplayer() && g_pScriptVM && (gpGlobals->eLoadType == MapLoad_Transition) )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will proper save/restore support for VScripts fix this issue?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a hack from Alien Swarm, not something that save/restore will impact.

@@ -21,6 +21,9 @@ $Conditional MAPBASE "1"

// Toggles Mapbase's RPC implementation
$Conditional MAPBASE_RPC "1"

// Toggles VScript implementation (note: interfaces still exist, just the provided implementation is not present)
$Conditional MAPBASE_VSCRIPT "1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding a unique VPC conditional and C++ preprocessor for this. I will probably use it for any Mapbase-specific expansions or changes to the VScript implementation unless you intended it to be used for more specific purposes only. (e.g. how it's used in vscript_shared.cpp)

@TeamSpen210
Copy link

Just so you know, in Valve's implementation regexes aren't save-loadable, and the point_template logic you were editing isn't fully functional.

* Fixes scopes not being restored from a save
* Fixes closure environment not being restored from a save
* Fixes singletons not being properly restored from a save
* Fixes root table being incorrectly duplicated in a save
* Fixes various cases where duplicate objects could be created from a save
@Blixibon Blixibon changed the base branch from master to feature/vscript May 21, 2020 13:53
@Blixibon Blixibon merged commit 2dbaa2c into mapbase-source:feature/vscript May 22, 2020
WhiteRedDragons pushed a commit to WhiteRedDragons/Mapbase-Fork that referenced this pull request Nov 25, 2022
Manhack changes required for npc_lost_soul
samisalreadytaken pushed a commit to samisalreadytaken/source-sdk-2013 that referenced this pull request Jan 15, 2023
Merge Houndeye PR from ez1/dev into ez1/mapbase
VDeltaGabriel pushed a commit to Project-P2009/p2009_sdk that referenced this pull request Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants