Raised This Month: $ Target: $400
 0% 

simple way to detect player stuck on spawn?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zXCaptainXz
Member
Join Date: May 2017
Old 10-20-2022 , 13:12   Re: simple way to detect player stuck on spawn?
Reply With Quote #1

Quote:
Originally Posted by loki_himself View Post
yes i saw that code of course. i hook postSpawn from csdm of course but i dont want to hook some touch function. this plugin you mentioned is complicated and i have used many plugins that cause crashes on the long run. natsheh already posted a correction for this approved plugin...

is there a known bug in csdm that causes the players to not spawn in preset places? for example in the map aim_map4ever there is 1 original map spawnpoint corrupted. and even though i set preset spawns, sometimes a player spawns stuck in the ground on that spawnpoint
The part which I borrowed from that plugin is not complicated at all, it's simply calling TraceHull once and checking for collisions, no loops involved or anything. It is called only once on spawn. The whole plugin on the other hand calls it on loop because it's checking all the time if the player is stuck, which you don't need.

You also didn't mention that you want to "prevent" that bug from happening in the first place, only that you want to "detect" if he's stuck on spawn. There's no simpler way than the one I mentioned as far as I'm aware. Maybe you could loop that function on map start on all spawns and somehow disable/delete faulty spawns.. I don't have much experience in CSDM so I don't know how how to deal with CSDM spawns, only normal ones.

Tl;dr let me know if you want code that deletes original map's faulty spawns
zXCaptainXz is offline
Reply


Thread Tools
Display Modes

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 20:05.


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