Skip to content
Snippets Groups Projects

Correct emerald & weapon ring/panel hitboxes, give drop shadows to weapon rings & panels

Merged sphere requested to merge weaponshadow into next
2 unresolved threads
  • Adds drop shadows to weapon panels and (thrown) weapon rings
  • Decreases Chaos Emerald hitbox height
  • Increases weapon panel hitbox height
  • Decreases weapon ring hitbox radius

Before: srb22198

After: srb22199

Edited by sphere

Merge request reports

Checking pipeline status.

Merged by spheresphere 1 year ago (Aug 20, 2023 5:15pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
10581 10581
10582 10582 if (thing->flags & (MF_ENEMY|MF_BOSS))
10583 10583 return FRACUNIT;
10584 else if (P_WeaponOrPanel(thing->type))
10585 return 2*FRACUNIT/3;
  • Comment on lines 10544 to +10585

    Funnily enough, I was about to make a merge request for this, too. In my case, I gave panels a shadow scale of 2*FRACUNIT/3 (like you did), but I gave standalone weapon ammo a shadow scale of 4*FRACUNIT/9 (to match normal Rings' shadows by counteracting the bigger mobj radius). I also gave thrown Rings/weapons a shadow (which your merge request currently doesn't).

    If you want to copy my homework, you can click to expand this section, and find a button to apply the changes - this comment would be obnoxiously big if it was shown by default:

    [Click to expand]
    Suggested change
    10544 case MT_EMBLEM:
    10545
    10546 case MT_TOKEN:
    10547 case MT_EMERALD1:
    10548 case MT_EMERALD2:
    10549 case MT_EMERALD3:
    10550 case MT_EMERALD4:
    10551 case MT_EMERALD5:
    10552 case MT_EMERALD6:
    10553 case MT_EMERALD7:
    10554 case MT_EMERHUNT:
    10555 case MT_FLINGEMERALD:
    10556
    10557 return 2*FRACUNIT/3;
    10558
    10559 case MT_FLICKY_01:
    10560 case MT_FLICKY_02:
    10561 case MT_FLICKY_03:
    10562 case MT_FLICKY_04:
    10563 case MT_FLICKY_05:
    10564 case MT_FLICKY_06:
    10565 case MT_FLICKY_07:
    10566 case MT_FLICKY_08:
    10567 case MT_FLICKY_09:
    10568 case MT_FLICKY_10:
    10569 case MT_FLICKY_11:
    10570 case MT_FLICKY_12:
    10571 case MT_FLICKY_13:
    10572 case MT_FLICKY_14:
    10573 case MT_FLICKY_15:
    10574 case MT_FLICKY_16:
    10575 case MT_SECRETFLICKY_01:
    10576 case MT_SECRETFLICKY_02:
    10577
    10578 return FRACUNIT;
    10579
    10580 default:
    10581
    10582 if (thing->flags & (MF_ENEMY|MF_BOSS))
    10583 return FRACUNIT;
    10584 else if (P_WeaponOrPanel(thing->type))
    10585 return 2*FRACUNIT/3;
    10544 case MT_REDRING:
    10545 case MT_BOUNCEPICKUP:
    10546 case MT_RAILPICKUP:
    10547 case MT_AUTOPICKUP:
    10548 case MT_EXPLODEPICKUP:
    10549 case MT_SCATTERPICKUP:
    10550 case MT_GRENADEPICKUP:
    10551 case MT_THROWNBOUNCE:
    10552 case MT_THROWNINFINITY:
    10553 case MT_THROWNAUTOMATIC:
    10554 case MT_THROWNSCATTER:
    10555 case MT_THROWNEXPLOSION:
    10556 case MT_THROWNGRENADE:
    10557
    10558 case MT_EMBLEM:
    10559
    10560 case MT_TOKEN:
    10561 case MT_EMERALD1:
    10562 case MT_EMERALD2:
    10563 case MT_EMERALD3:
    10564 case MT_EMERALD4:
    10565 case MT_EMERALD5:
    10566 case MT_EMERALD6:
    10567 case MT_EMERALD7:
    10568 case MT_EMERHUNT:
    10569 case MT_FLINGEMERALD:
    10570
    10571 return 2*FRACUNIT/3;
    10572
    10573 case MT_BOUNCERING:
    10574 case MT_RAILRING:
    10575 case MT_INFINITYRING:
    10576 case MT_AUTOMATICRING:
    10577 case MT_EXPLOSIONRING:
    10578 case MT_SCATTERRING:
    10579 case MT_GRENADERING:
    10580
    10581 return 4*FRACUNIT/9; // The same shadow coverage as normal Rings, counteracting the bigger mobj radius
    10582
    10583 case MT_FLICKY_01:
    10584 case MT_FLICKY_02:
    10585 case MT_FLICKY_03:
    10586 case MT_FLICKY_04:
    10587 case MT_FLICKY_05:
    10588 case MT_FLICKY_06:
    10589 case MT_FLICKY_07:
    10590 case MT_FLICKY_08:
    10591 case MT_FLICKY_09:
    10592 case MT_FLICKY_10:
    10593 case MT_FLICKY_11:
    10594 case MT_FLICKY_12:
    10595 case MT_FLICKY_13:
    10596 case MT_FLICKY_14:
    10597 case MT_FLICKY_15:
    10598 case MT_FLICKY_16:
    10599 case MT_SECRETFLICKY_01:
    10600 case MT_SECRETFLICKY_02:
    10601
    10602 return FRACUNIT;
    10603
    10604 default:
    10605
    10606 if (thing->flags & (MF_ENEMY|MF_BOSS))
    10607 return FRACUNIT;
  • Author Contributor

    I also gave thrown Rings/weapons a shadow (which your merge request currently doesn't).

    That is a good catch, didn't think of that.

    However, I'm not a fan of giving weapon rings a distinct shadow scale just to counteract their bigger hitbox. I'd rather see weapon ring hitboxes brought in line with regular rings, since their sprites are basically the same size.

    Edited by sphere
  • sphere changed this line in version 2 of the diff

    changed this line in version 2 of the diff

  • Please register or sign in to reply
  • sphere added 1 commit

    added 1 commit

    • 73ded478 - Fix ammo/panel/emerald hitboxes, add shadows to thrown rings

    Compare with previous version

  • sphere changed title from Give drop shadows to weapon rings & panels to Correct emerald & weapon ring/panel hitboxes, give drop shadows to weapon rings & panels

    changed title from Give drop shadows to weapon rings & panels to Correct emerald & weapon ring/panel hitboxes, give drop shadows to weapon rings & panels

  • sphere changed the description

    changed the description

  • With some mobjs' radii and heights being changed, extras/conf/SRB2-22.cfg and extras/conf/udb/Includes/SRB222_things.cfg should be updated to match.

  • sphere added 1 commit

    added 1 commit

    • 28849c31 - Update (U)ZB config with hitbox tweaks

    Compare with previous version

  • 4425 4423 title = "CTF Team Ring (Blue)";
    4426 4424 sprite = "internal:TRNGA0B";
    4427 width = 16;
    4428 4425 }
    4429 4426 330
    4430 4427 {
    4431 4428 title = "Bounce Ring Panel";
    4432 4429 sprite = "PIKBA0";
    4430 width = 24;
    4431 height = 40;
    4433 4432 }
    4434 4433 331
    4435 4434 {
    4436 4435 title = "Rail Ring Panel";
    4437 4436 sprite = "PIKRA0";
    4437 width = 24;
  • sphere added 1 commit

    added 1 commit

    • c64b242f - Note to self: don't do busywork right after waking up from a short night of sleep

    Compare with previous version

  • Contributor

    I would be a bigger fan of increasing the rings' hitboxes and not shrinking everything else, but I guess it's fine

  • sphere changed milestone to %2.2.12

    changed milestone to %2.2.12

  • merged

  • sphere mentioned in commit 9d6578d4

    mentioned in commit 9d6578d4

  • Please register or sign in to reply
    Loading