Jump to content

When is Server.ClassCount populated/updated?


Recommended Posts

Good afternoon,

In OnMapLoad, I wanted to write something like:

if ( Server.ClassCount[ TEAM.AXIS ][ CLASS.COVERTOPS ] > 0 )
{
	Util.LimitToClass( "PLANT_X", TEAM.AXIS, CLASS.COVERTOPS );
}

But it returns 0 even though there's an Axis Covi

I saw UpdateClasses in et_classmanager, which seems relevant, but not called from gm files (haven't check source code)

There's Util.InitializeClassTables which does the initialization from et_autoexec

Outside that...

If DisableClassManager is 1 in et_autoexec, the count seems to remain at 0 no matter what

With it at 0 (default), on a map without satchelable stuff OnMapLoad, the count is 0; but as soon as some Allied Engi builds something satchelable, it updates to whatever the team/class count is

That's pure observation on Svarvadel using /bot p Server.ClassCount[TEAM.AXIS][CLASS.COVERTOPS], count gets to 1 as soon as either the Gun Control Ladder or the Scaffolding gets built, so I'm quite interested in how that works
Map download link in case there's some magic not working for that particular map: https://et.clan-etc.de/etmain/svarvadel.pk3

Or perhaps this is something not supposed to be used in map scripts but rather strictly internally by OB?

Thank you in advance

Regards

Edited by Mateos
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...