whosit reports: [test server] headanim can create "invalid" vectors with some look directions like vector.new(0,-mat ... #9083
Labels
No Label
1. kind/balancing
1. kind/breaking
1. kind/bug
1. kind/construction
1. kind/documentation
1. kind/enhancement
1. kind/griefing
1. kind/invalid
1. kind/meme
1. kind/node limit
1. kind/other
1. kind/protocol
2. prio/controversial
2. prio/critical
2. prio/elevated
2. prio/good first issue
2. prio/interesting
2. prio/low
3. source/art
3. source/client
3. source/engine
3. source/ingame
3. source/integration
3. source/lag
3. source/license
3. source/mod upstream
3. source/petz
3. source/testserver
3. source/unknown
3. source/website
4. step/approved
4. step/at work
4. step/blocked
4. step/discussion
4. step/help wanted
4. step/needs confirmation
4. step/partially fixed
4. step/possible close
4. step/QA main
4. step/QA NOK
4. step/QA OK
4. step/question
4. step/ready to deploy
4. step/ready to QA test
4. step/want approval
5. result/cannot reproduce
5. result/duplicate
5. result/fixed
5. result/maybe
5. result/wontfix
kind/standalone
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: your-land/bugtracker#9083
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
whosit reports a bug:
[test server] headanim can create "invalid" vectors with some look directions like vector.new(0,-math.pi/2,0)
Doing this will crash:
/eval futil.set_look_dir(me, vector.new(0,-math.pi/2,0))WARNING: you won't be able to join the game with the account ever again until you fix the headanim math :D (or disable the mod :p)
Status:
There isn't much math here...
So, I guess, you can get invalid value past the API (in this case via
futil.set_look_dir()which I implemented myself :D), it gets stored and then the game breaks?In this case:
math.asin(math.pi/2) == NaN(btw, this is the commit that adds these checks for vectors:
6ca9d75f0b)So it's partly fault of my
set_look_dirimplementation not checking if values are valid and partly fault of minetest API for just accepting them, then returning now "illegal" vectors? X)Also, just doing with no mods (or on previous versions):
/eval me:set_look_vertical(1/0)messes up the camera and nothing gets rendered.