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

Add change_level() native. #104

Merged
merged 4 commits into from Aug 6, 2014
Merged

Conversation

Arkshine
Copy link
Member

@Arkshine Arkshine commented Aug 5, 2014

This add a new change_level native to change a map, using pfnChangeLevel engine function.
It's basically the same as using changelevel server command but this will trigger properly server_changelevel forward.
This forward was never called because of plugins using directly the command to change a map and resulting forward not being called. By default the game uses the engine function.

Probably some kind of late change, but with some proper documentation/guide, coder will use this native instead.

@xPaw
Copy link
Contributor

xPaw commented Aug 5, 2014

👍

*
* @note This calls the pfnChangelLevel engine function.
* @note This has the same behavior as calling "changelevel" server command,
* but this will trigger properly server_changelevel() forward.
Copy link
Member

Choose a reason for hiding this comment

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

I would rewrite this as:
This has the same behavior as calling the "changelevel" server command,
but this will also trigger the server_changelevel() forward in AMXX plugins.
It will also notify any Metamod plugins that are hooking pfnChangeLevel.

@Arkshine
Copy link
Member Author

Arkshine commented Aug 6, 2014

Thanks, it's changed now.

@TheDS
Copy link
Member

TheDS commented Aug 6, 2014

There's an extra comma on the first line, but other than that, 🐑

Arkshine added a commit that referenced this pull request Aug 6, 2014
@Arkshine Arkshine merged commit c72d130 into alliedmodders:master Aug 6, 2014
@Arkshine Arkshine deleted the add-change_level branch August 6, 2014 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants