Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SRB2-archivedmodifications
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Skydusk
SRB2-archivedmodifications
Commits
e7e9bb54
Commit
e7e9bb54
authored
Mar 5, 2024
by
Ace Lite
Browse files
Options
Downloads
Patches
Plain Diff
Fixing wrong if conditions
parent
3f1e6a63
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/y_inter.c
+4
-4
4 additions, 4 deletions
src/y_inter.c
with
4 additions
and
4 deletions
src/y_inter.c
+
4
−
4
View file @
e7e9bb54
...
@@ -2090,12 +2090,12 @@ static void Y_AwardCoopBonuses(int awarddenial)
...
@@ -2090,12 +2090,12 @@ static void Y_AwardCoopBonuses(int awarddenial)
for
(
j
=
0
;
j
<
4
;
++
j
)
// Set bonuses
for
(
j
=
0
;
j
<
4
;
++
j
)
// Set bonuses
{
{
//Set the bonus, but only if we actually finished
//Set the bonus, but only if we actually finished
if
(
players
[
i
].
pflags
&
PF_FINISHED
&&
awarddenial
=
=
2
)
if
(
players
[
i
].
pflags
&
PF_FINISHED
&&
awarddenial
!
=
2
)
(
bonuses_list
[
bonusnum
][
j
])(
&
players
[
i
],
&
localbonuses
[
j
]);
(
bonuses_list
[
bonusnum
][
j
])(
&
players
[
i
],
&
localbonuses
[
j
]);
else
else
Y_SetNullBonus
(
&
players
[
i
],
&
localbonuses
[
j
]);
Y_SetNullBonus
(
&
players
[
i
],
&
localbonuses
[
j
]);
if
(
awarddenial
=
=
2
)
if
(
awarddenial
!
=
2
)
{
{
players
[
i
].
score
+=
localbonuses
[
j
].
points
;
players
[
i
].
score
+=
localbonuses
[
j
].
points
;
if
(
players
[
i
].
score
>
MAXSCORE
)
if
(
players
[
i
].
score
>
MAXSCORE
)
...
@@ -2109,7 +2109,7 @@ static void Y_AwardCoopBonuses(int awarddenial)
...
@@ -2109,7 +2109,7 @@ static void Y_AwardCoopBonuses(int awarddenial)
ptlives
=
min
(
ptlives
=
min
(
(
INT32
)((
!
ultimatemode
&&
!
modeattacking
&&
players
[
i
].
lives
!=
INFLIVES
)
?
max
((
INT32
)((
players
[
i
].
score
/
50000
)
-
(
oldscore
/
50000
)),
(
INT32
)
0
)
:
0
),
(
INT32
)((
!
ultimatemode
&&
!
modeattacking
&&
players
[
i
].
lives
!=
INFLIVES
)
?
max
((
INT32
)((
players
[
i
].
score
/
50000
)
-
(
oldscore
/
50000
)),
(
INT32
)
0
)
:
0
),
(
INT32
)(
mapheaderinfo
[
prevmap
]
->
maxbonuslives
<
0
?
INT32_MAX
:
mapheaderinfo
[
prevmap
]
->
maxbonuslives
));
(
INT32
)(
mapheaderinfo
[
prevmap
]
->
maxbonuslives
<
0
?
INT32_MAX
:
mapheaderinfo
[
prevmap
]
->
maxbonuslives
));
if
(
ptlives
&&
awarddenial
=
=
2
)
if
(
ptlives
&&
awarddenial
!
=
2
)
P_GivePlayerLives
(
&
players
[
i
],
ptlives
);
P_GivePlayerLives
(
&
players
[
i
],
ptlives
);
if
(
i
==
consoleplayer
)
if
(
i
==
consoleplayer
)
...
@@ -2161,7 +2161,7 @@ static void Y_AwardSpecialStageBonus(int awarddenial)
...
@@ -2161,7 +2161,7 @@ static void Y_AwardSpecialStageBonus(int awarddenial)
(
INT32
)((
!
ultimatemode
&&
!
modeattacking
&&
players
[
i
].
lives
!=
INFLIVES
)
?
max
((
INT32
)((
players
[
i
].
score
/
50000
)
-
(
oldscore
/
50000
)),
(
INT32
)
0
)
:
0
),
(
INT32
)((
!
ultimatemode
&&
!
modeattacking
&&
players
[
i
].
lives
!=
INFLIVES
)
?
max
((
INT32
)((
players
[
i
].
score
/
50000
)
-
(
oldscore
/
50000
)),
(
INT32
)
0
)
:
0
),
(
INT32
)(
mapheaderinfo
[
prevmap
]
->
maxbonuslives
<
0
?
INT32_MAX
:
mapheaderinfo
[
prevmap
]
->
maxbonuslives
));
(
INT32
)(
mapheaderinfo
[
prevmap
]
->
maxbonuslives
<
0
?
INT32_MAX
:
mapheaderinfo
[
prevmap
]
->
maxbonuslives
));
if
(
awarddenial
=
=
2
)
if
(
awarddenial
!
=
2
)
{
{
players
[
i
].
score
+=
localbonuses
[
0
].
points
;
players
[
i
].
score
+=
localbonuses
[
0
].
points
;
players
[
i
].
score
+=
localbonuses
[
1
].
points
;
players
[
i
].
score
+=
localbonuses
[
1
].
points
;
...
...
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