Differences From Artifact [945da2b6da]:
- File
src/entities.m
— part of check-in
[75e920ae30]
at
2025-03-29 14:25:43
on branch trunk
— Switch from clang-format to manual formatting
clang-format does too many weird things. (user: js, size: 7753) [annotate] [blame] [check-ins using]
To Artifact [384373114a]:
- File src/entities.m — part of check-in [c634a689e7] at 2025-03-29 17:13:40 on branch trunk — More style fixes (user: js, size: 7554) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
47 48 49 50 51 52 53 | for (Entity *e in ents) { if (e.type == MAPMODEL) { MapModelInfo *mmi = getmminfo(e.attr2); if (mmi == nil) continue; rendermodel(mmi.name, 0, 1, e.attr4, (float)mmi.rad, | | | < | | < | < | > | < | < < | < | | < | | | | | < | | 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | for (Entity *e in ents) { if (e.type == MAPMODEL) { MapModelInfo *mmi = getmminfo(e.attr2); if (mmi == nil) continue; rendermodel(mmi.name, 0, 1, e.attr4, (float)mmi.rad, OFMakeVector3D(e.x, (float)S(e.x, e.y)->floor + mmi.zoff + e.attr3, e.y), (float)((e.attr1 + 7) - (e.attr1 + 7) % 15), 0, false, 1.0f, 10.0f, mmi.snap, 0); } else { if (OUTBORD(e.x, e.y)) continue; if (e.type != CARROT) { if (!e.spawned && e.type != TELEPORT) continue; if (e.type < I_SHELLS || e.type > TELEPORT) continue; renderent(e, entmdlnames[e.type - I_SHELLS], (float)(1 + sin(lastmillis / 100.0 + e.x + e.y) / 20), lastmillis / 10.0f, 0, 1, 0, 10.0f); } else { switch (e.attr2) { case 1: case 3: continue; case 2: case 0: if (!e.spawned) continue; renderent(e, @"carrot", (float)(1 + sin(lastmillis / 100.0 + e.x + e.y) / 20), lastmillis / (e.attr2 ? 1.0f : 10.0f), 0, 1, 0, 10.0f); break; case 4: renderent(e, @"switch2", 3, (float)e.attr3 * 90, (!e.spawned && !triggertime) ? 1 : 0, (e.spawned || !triggertime) ? 1 : 2, triggertime, 1050.0f); break; case 5: renderent(e, @"switch1", -0.15f, (float)e.attr3 * 90, (!e.spawned && !triggertime) ? 30 : 0, (e.spawned || !triggertime) ? 1 : 30, triggertime, 35.0f); break; } } } } } |
︙ | ︙ |