Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
RingRacers
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kart Krew
RingRacers
Commits
176378dc
Commit
176378dc
authored
1 year ago
by
JugadorXEI
Browse files
Options
Downloads
Patches
Plain Diff
Instawhip Recharge Mobj optimizations
parent
8326292a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/objects/instawhip.c
+4
-6
4 additions, 6 deletions
src/objects/instawhip.c
with
4 additions
and
6 deletions
src/objects/instawhip.c
+
4
−
6
View file @
176378dc
...
@@ -59,14 +59,11 @@ void Obj_InstaWhipThink (mobj_t *whip)
...
@@ -59,14 +59,11 @@ void Obj_InstaWhipThink (mobj_t *whip)
void
Obj_SpawnInstaWhipRecharge
(
player_t
*
player
,
angle_t
angleOffset
)
void
Obj_SpawnInstaWhipRecharge
(
player_t
*
player
,
angle_t
angleOffset
)
{
{
mobj_t
*
x
=
P_SpawnMobjFromMobj
(
player
->
mo
,
0
,
0
,
0
,
MT_INSTAWHIP_RECHARGE
);
mobj_t
*
x
=
P_SpawnMobjFromMobj
(
player
->
mo
,
0
,
0
,
player
->
mo
->
height
/
2
,
MT_INSTAWHIP_RECHARGE
);
// This was previously used to delay the visual, back when this was VFX for a cooldown
// instead of VFX for a charge. We want to instantly bail out of that state now.
x
->
tics
=
1
;
x
->
renderflags
|=
RF_SLOPESPLAT
|
RF_NOSPLATBILLBOARD
;
x
->
renderflags
|=
RF_SLOPESPLAT
|
RF_NOSPLATBILLBOARD
;
P_SetTarget
(
&
recharge_target
(
x
),
player
->
mo
);
P_SetTarget
(
&
recharge_target
(
x
),
player
->
mo
);
P_InstaScale
(
x
,
x
->
target
->
scale
*
2
);
recharge_offset
(
x
)
=
angleOffset
;
recharge_offset
(
x
)
=
angleOffset
;
}
}
...
@@ -81,7 +78,8 @@ void Obj_InstaWhipRechargeThink(mobj_t *x)
...
@@ -81,7 +78,8 @@ void Obj_InstaWhipRechargeThink(mobj_t *x)
}
}
P_MoveOrigin
(
x
,
target
->
x
,
target
->
y
,
target
->
z
+
(
target
->
height
/
2
));
P_MoveOrigin
(
x
,
target
->
x
,
target
->
y
,
target
->
z
+
(
target
->
height
/
2
));
P_InstaScale
(
x
,
2
*
target
->
scale
);
if
(
x
->
scale
!=
target
->
scale
*
2
)
P_InstaScale
(
x
,
target
->
scale
*
2
);
x
->
angle
=
target
->
angle
+
recharge_offset
(
x
);
x
->
angle
=
target
->
angle
+
recharge_offset
(
x
);
// Flickers every other frame
// Flickers every other frame
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment