Skip to content

Bots check that they have a grenade throwing vantage point - #2074

Draft
sunzenshen wants to merge 1 commit into
NeotokyoRebuild:masterfrom
sunzenshen:bot-grenade-throw-check-vantage-first
Draft

Bots check that they have a grenade throwing vantage point#2074
sunzenshen wants to merge 1 commit into
NeotokyoRebuild:masterfrom
sunzenshen:bot-grenade-throw-check-vantage-first

Conversation

@sunzenshen

@sunzenshen sunzenshen commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Description

At the start of the grenade throwing behavior, bots check that they have a grenade throwing vantage point.
This prevents some jitter in behavior where bots swap a grenade into their hand and then immediately swap back to another weapon.

Toolchain

  • Windows MSVC VS2022

... before swapping their weapon to a grenade and before pulling the pin on a grenade.
@sunzenshen sunzenshen added the Bots Related to bot players label Aug 17, 2026
@sunzenshen
sunzenshen requested a review from a team August 17, 2026 07:13
@AdamTadeusz

Copy link
Copy Markdown
Contributor
image

Got this message, never seen a box like this before.

Stack Trace:

 	server.dll!common_assert_to_message_box<wchar_t>(const wchar_t * const expression, const wchar_t * const file_name, const unsigned int line_number, void * const return_address) Line 388	C++
 	server.dll!common_assert<wchar_t>(const wchar_t * const expression, const wchar_t * const file_name, const unsigned int line_number, void * const return_address) Line 424	C++
>	server.dll!_wassert(const wchar_t * expression, const wchar_t * file_name, unsigned int line_number) Line 444	C++
 	server.dll!CUtlStack<CHandle<CBaseHL2MPCombatWeapon>,CUtlMemory<CHandle<CBaseHL2MPCombatWeapon>,int>>::Pop() Line 282	C++
 	server.dll!CNEOBot::PopRequiredWeapon() Line 1750	C++
 	server.dll!CNEOBotGrenadeThrow::OnEnd(CNEOBot * me, Action<CNEOBot> * nextAction) Line 519	C++
 	server.dll!Action<CNEOBot>::InvokeOnEnd(CNEOBot * me, Behavior<CNEOBot> * behavior, Action<CNEOBot> * nextAction) Line 1432	C++
 	server.dll!Action<CNEOBot>::ApplyResult(CNEOBot * me, Behavior<CNEOBot> * behavior, ActionResult<CNEOBot> result) Line 1660	C++
 	server.dll!Action<CNEOBot>::ApplyResult(CNEOBot * me, Behavior<CNEOBot> * behavior, ActionResult<CNEOBot> result) Line 1650	C++
 	server.dll!Action<CNEOBot>::InvokeUpdate(CNEOBot * me, Behavior<CNEOBot> * behavior, float interval) Line 1379	C++
 	server.dll!Action<CNEOBot>::InvokeUpdate(CNEOBot * me, Behavior<CNEOBot> * behavior, float interval) Line 1379	C++
 	server.dll!Action<CNEOBot>::InvokeUpdate(CNEOBot * me, Behavior<CNEOBot> * behavior, float interval) Line 1379	C++
 	server.dll!Behavior<CNEOBot>::Update(CNEOBot * me, float interval) Line 258	C++
 	server.dll!CNEOBotIntention::Update() Line 2884	C++
 	server.dll!INextBot::Update() Line 133	C++
 	server.dll!NextBotPlayer<CNEO_Player>::Update() Line 1093	C++
 	server.dll!CNEOBot::Update() Line 860	C++
 	server.dll!NextBotPlayer<CNEO_Player>::PhysicsSimulate() Line 836	C++
 	server.dll!CNEOBot::PhysicsSimulate() Line 716	C++
 	server.dll!Physics_SimulateEntity(CBaseEntity * pEntity) Line 2019	C++
 	server.dll!Physics_RunThinkFunctions(bool simulating) Line 2075	C++
 	server.dll!CServerGameDLL::GameFrame(bool simulating) Line 1289	C++
 	[External Code]	

@AdamTadeusz

Copy link
Copy Markdown
Contributor
image

Got this message, never seen a box like this before.

Stack Trace:

 	server.dll!common_assert_to_message_box<wchar_t>(const wchar_t * const expression, const wchar_t * const file_name, const unsigned int line_number, void * const return_address) Line 388	C++
 	server.dll!common_assert<wchar_t>(const wchar_t * const expression, const wchar_t * const file_name, const unsigned int line_number, void * const return_address) Line 424	C++
>	server.dll!_wassert(const wchar_t * expression, const wchar_t * file_name, unsigned int line_number) Line 444	C++
 	server.dll!CUtlStack<CHandle<CBaseHL2MPCombatWeapon>,CUtlMemory<CHandle<CBaseHL2MPCombatWeapon>,int>>::Pop() Line 282	C++
 	server.dll!CNEOBot::PopRequiredWeapon() Line 1750	C++
 	server.dll!CNEOBotGrenadeThrow::OnEnd(CNEOBot * me, Action<CNEOBot> * nextAction) Line 519	C++
 	server.dll!Action<CNEOBot>::InvokeOnEnd(CNEOBot * me, Behavior<CNEOBot> * behavior, Action<CNEOBot> * nextAction) Line 1432	C++
 	server.dll!Action<CNEOBot>::ApplyResult(CNEOBot * me, Behavior<CNEOBot> * behavior, ActionResult<CNEOBot> result) Line 1660	C++
 	server.dll!Action<CNEOBot>::ApplyResult(CNEOBot * me, Behavior<CNEOBot> * behavior, ActionResult<CNEOBot> result) Line 1650	C++
 	server.dll!Action<CNEOBot>::InvokeUpdate(CNEOBot * me, Behavior<CNEOBot> * behavior, float interval) Line 1379	C++
 	server.dll!Action<CNEOBot>::InvokeUpdate(CNEOBot * me, Behavior<CNEOBot> * behavior, float interval) Line 1379	C++
 	server.dll!Action<CNEOBot>::InvokeUpdate(CNEOBot * me, Behavior<CNEOBot> * behavior, float interval) Line 1379	C++
 	server.dll!Behavior<CNEOBot>::Update(CNEOBot * me, float interval) Line 258	C++
 	server.dll!CNEOBotIntention::Update() Line 2884	C++
 	server.dll!INextBot::Update() Line 133	C++
 	server.dll!NextBotPlayer<CNEO_Player>::Update() Line 1093	C++
 	server.dll!CNEOBot::Update() Line 860	C++
 	server.dll!NextBotPlayer<CNEO_Player>::PhysicsSimulate() Line 836	C++
 	server.dll!CNEOBot::PhysicsSimulate() Line 716	C++
 	server.dll!Physics_SimulateEntity(CBaseEntity * pEntity) Line 2019	C++
 	server.dll!Physics_RunThinkFunctions(bool simulating) Line 2075	C++
 	server.dll!CServerGameDLL::GameFrame(bool simulating) Line 1289	C++
 	[External Code]	

I remember the bot I was spectating wanted to throw a grenade but then changed their mind, i don't know if maybe this same bot tried to throw the grenade again and that caused the issue?

@sunzenshen
sunzenshen marked this pull request as draft August 17, 2026 16:32
@sunzenshen
sunzenshen removed the request for review from a team August 17, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bots Related to bot players

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants