Raised This Month: $ Target: $400
 0% 

Solved How to recache spawn points?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-06-2024 , 23:06   Re: How to recache spawn points?
Reply With Quote #1

The engine doesn't "cache" entities (I don't think it actually caches anything) but the client does cache files (models, sounds, etc.). Even if you were able to enable and disable spawn points, are you sure that they would even be random? In the game I play, Day of Defeat, they are definitely not random so certain spawn points would only get used if all of the others are already taken (have a player that spawned but hasn't moved yet).
__________________

Last edited by fysiks; 02-06-2024 at 23:13.
fysiks is offline
damage220
Member
Join Date: Jul 2022
Location: Ukraine
Old 02-07-2024 , 13:53   Re: How to recache spawn points?
Reply With Quote #2

Quote:
Originally Posted by fysiks View Post
The engine doesn't "cache" entities (I don't think it actually caches anything) but the client does cache files (models, sounds, etc.).
I think of it because I I see no reason why the engine does not utilize spawn points created in plugin_init or later. I think it is not reasonable to iterate all entities and check whether their classes are "info_player_deathmatch" or "info_player_start" on each player spawn. I would load a map, go through all these entities and create a tree of structures.
PHP Code:
struct sp {
  
int ent_index;
  
float origin[3];
  
float angles[3];
  
struct sp *next;
}; 
While this is only my assumption, it may explain why the engine does not recognize spawn points created after plugin_precache.

Quote:
Originally Posted by fysiks View Post
Even if you were able to enable and disable spawn points, are you sure that they would even be random? In the game I play, Day of Defeat, they are definitely not random so certain spawn points would only get used if all of the others are already taken (have a player that spawned but hasn't moved yet).
Oh, yes, default spawn points are not random. The game spawns first player in first spawn point, second player in second spawn point and so on. So it basically iterates from the first to last spawn point, but it is not a big deal for me.

Last edited by damage220; 02-07-2024 at 21:59.
damage220 is online now
Reply



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