Raised This Month: $ Target: $400
 0% 

Solved How to recache spawn points?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
damage220
Member
Join Date: Jul 2022
Location: Ukraine
Old 02-06-2024 , 14:52   How to recache spawn points?
Reply With Quote #1

In my FFA plugin I created a set of virtual spawn points, I mean they do not have an entity assigned to. In player spawn event I teleport the player to random virtual spawn point. It works but I am curious if it can be done using real spawn points.

My plugin is hot swappable and therefore default entities should be replaced with FFA ones, with the ability to revert these changes multiple times. I can easily remove default spawn points, but I cannot add new ones.

I did several tests and I found out that such entities should be created in early timing only, like in plugin_precache. It looks like there is some caching mechanism to create a tree of entities, with "info_player_deathmatch" and "info_player_start" classes, to store their indexes.

But if I have to remove entities, they will no longer work once I restore them back. Is there a function I can call to "cache" those entities like the engine does after plugin_precache? Or is there only teleport option? Maybe I can somehow disable spawn entities by assigning a player to it so that engine would not consider it for spawn?

Last edited by damage220; 02-09-2024 at 23:00.
damage220 is online now
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:33.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode