mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-13 05:36:22 +00:00
Allow scripts (or other outside sources) to easily change the properties of an item capsule
This commit is contained in:
parent
9151d31512
commit
da37ba8238
2 changed files with 7 additions and 0 deletions
|
|
@ -14661,6 +14661,9 @@ void P_RefreshItemCapsuleParts(mobj_t *mobj)
|
|||
mobj_t *part = mobj->tracer;
|
||||
skincolornum_t color;
|
||||
|
||||
part->threshold = mobj->threshold;
|
||||
part->movecount = mobj->movecount;
|
||||
|
||||
if (itemType < 1 || itemType >= NUMKARTITEMS)
|
||||
itemType = KITEM_SAD;
|
||||
|
||||
|
|
|
|||
|
|
@ -6144,6 +6144,10 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
|
|||
INT32 itemType = mobj->threshold;
|
||||
mobj_t *part = mobj->tracer;
|
||||
|
||||
if (mobj->threshold != part->threshold
|
||||
|| mobj->movecount != part->movecount) // allow scripters to easily change the capsule properties!
|
||||
P_RefreshItemCapsuleParts(mobj);
|
||||
|
||||
if (itemType < 1 || itemType >= NUMKARTITEMS)
|
||||
itemType = KITEM_SAD;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue