Tempust85 Posted May 28, 2015 Posted May 28, 2015 I know OpenJK isn't about adding new features, but I feel this would be welcomed feature. Currently, the "width" setting for NPC controls both X & Y of the bounding box. What I propose is, removing the control of both X & Y from "width" and adding new stat "widthY" setting for Y. So in the end, "width" will control X & "widthY" will control Y. Here's the code that I've tinkered with: NPC_stats.cpp //===MOVEMENT STATS============================================================ if ( !Q_stricmp( token, "width" ) ) { if ( COM_ParseInt( &p, &n ) ) { continue; } NPC->mins[0] = -n; NPC->maxs[0] = n; continue; } if (!Q_stricmp(token, "widthY")) { if (COM_ParseInt(&p, &n)) { continue; } NPC->mins[1] = -n; NPC->maxs[1] = n; continue; } Tested ingame and it works great. This would be very useful when adding odd-shaped NPCs ie the Kryat Dragon. Ideally, using a collision model would be better but this is an alternative solution. Archangel35757 likes this
Raz0r Posted May 28, 2015 Posted May 28, 2015 I think there were issues with non-square bounding boxes regarding prediction? or something, there are a few hacks around regarding bbox sizes
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now