NextBot loco crashing gmod if spawning in invalid position
1 replies, posted
If I try to access a nextbot's locomotion (e.g. bot.loco), when the NextBot is in an invalid position, such as inside a wall or under the ground, the game crashes.
Anyone else had this issue? I have it even with the NextBot from the tutorial on the wiki.
Here, have a crashdump if it helps. [url]http://puu.sh/a8rJS/aacd17d5de.mdmp[/url]
If anyone has an idea on how to avoid this specific crash, or validate the position on spawn, let me know.
EDIT: It doesn't seem to happen with SET or GET functions, but with others such as IsStuck or FaceTowards it does. I'll post a few more later.
Solved using [url="http://wiki.garrysmod.com/page/util/PointContents"]util.PointContents(pos)[/url]
I check the spawning position before anything else, if it's not CONTENTS_EMPTY then I won't spawn it.
Sorry, you need to Log In to post a reply to this thread.