Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Division by zero in G_RunEntity #2086

Open
suburbski opened this issue Jul 30, 2022 · 0 comments
Open

Division by zero in G_RunEntity #2086

suburbski opened this issue Jul 30, 2022 · 0 comments
Labels
🐞 Bug Something isn't working cat: mod QAGAME Category mod (qagame) P3: Normal Priority 3
Milestone

Comments

@suburbski
Copy link
Contributor

Multiple divisions by zero if level.frameTime is zero:

G_RunEntity(&g_entities[i], level.frameTime);

VectorScale(ent->instantVelocity, 1000.0f / msec, ent->instantVelocity);

etlegacy/src/game/g_main.c:5251:3: runtime error: division by zero
etlegacy/src/game/g_main.c:5251:3: runtime error: division by zero
etlegacy/src/game/g_main.c:5251:3: runtime error: division by zero
etlegacy/src/game/g_main.c:5296:2: runtime error: division by zero
etlegacy/src/game/g_main.c:5296:2: runtime error: division by zero
etlegacy/src/game/g_main.c:5296:2: runtime error: division by zero
etlegacy/src/game/g_main.c:5240:3: runtime error: division by zero
etlegacy/src/game/g_main.c:5240:3: runtime error: division by zero
etlegacy/src/game/g_main.c:5240:3: runtime error: division by zero
@Aranud Aranud added 🐞 Bug Something isn't working P3: Normal Priority 3 cat: mod QAGAME Category mod (qagame) labels Aug 13, 2022
@Aranud Aranud added this to the Future milestone Aug 13, 2022
@Aranud Aranud closed this as completed Aug 22, 2022
@Aranud Aranud modified the milestones: Future, 2.81.0 Nov 14, 2022
Aciz added a commit to Aciz/etlegacy that referenced this issue Jan 29, 2023
Aranud pushed a commit that referenced this issue Feb 25, 2023

This reverts commit 8f480d3.

This causes timing issues with mapscripts. This means that #2086 is again an issue, and another solution should be implemented to prevent that.

Fixes #2235
@Aranud Aranud reopened this Feb 27, 2023
@Aranud Aranud modified the milestones: 2.81.0, 2.82.0 Feb 28, 2023
@Aranud Aranud modified the milestones: 2.82.0, Future Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug Something isn't working cat: mod QAGAME Category mod (qagame) P3: Normal Priority 3
Projects
None yet
Development

No branches or pull requests

2 participants