Skip to content

Expose CBaseServer::GetSpawnCount #3017

@artemking4

Description

@artemking4

Description

This is the amount of map changes on the server from its process start. Can be useful in some scenarios.

Activity

robotboy655

robotboy655 commented on Nov 28, 2025

@robotboy655
Contributor

Can be useful in some scenarios.

Such as?

artemking4

artemking4 commented on Nov 28, 2025

@artemking4
Author

Welp, knowing whether the current state start is a cold one, or is actually a "reboot" from another map, without dirty checks/hacks.
A specific example would be i.e. a server subscribing to some sort of event queue on process start, and not redoing that every time a map changes. Another one is posting/acquiring some data only on server start, and doing something else in other scenarios. An example is telemetry.

robotboy655

robotboy655 commented on Nov 28, 2025

@robotboy655
Contributor

You are in luck as this value appears to be exposed via gpGlobals->serverCount, added as game.GetMapChangeCount (serverside only)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Lua APIA request to add a new function.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @robotboy655@artemking4

        Issue actions