Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SRB2Classic
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
chromaticpipe
SRB2Classic
Commits
a709ff9e
Commit
a709ff9e
authored
Feb 12, 2024
by
Lactozilla
Browse files
Options
Downloads
Patches
Plain Diff
Fix Lua 'searchBlockmap'
parent
30871071
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/lua_blockmaplib.c
+3
-8
3 additions, 8 deletions
src/lua_blockmaplib.c
src/p_maputl.c
+2
-4
2 additions, 4 deletions
src/p_maputl.c
with
5 additions
and
12 deletions
src/lua_blockmaplib.c
+
3
−
8
View file @
a709ff9e
...
...
@@ -312,17 +312,12 @@ static int lib_searchBlockmap(lua_State *L)
continue
;
// our thing just found itself, so move on
funcret
=
lib_searchBlockmap_Objects
(
L
,
mobj
,
itmobj
);
if
(
funcret
==
2
)
{
lua_pushboolean
(
L
,
false
);
return
1
;
}
else
if
(
funcret
==
1
)
retval
=
false
;
if
(
P_MobjWasRemoved
(
mobj
))
{
if
(
funcret
==
2
||
P_MobjWasRemoved
(
mobj
))
{
retval
=
false
;
break
;
}
else
if
(
funcret
==
1
)
retval
=
false
;
}
}
while
(
itmobj
!=
NULL
);
...
...
This diff is collapsed.
Click to expand it.
src/p_maputl.c
+
2
−
4
View file @
a709ff9e
...
...
@@ -1095,8 +1095,6 @@ bthingit_t *P_NewBlockThingsIterator(int x1, int y1, int x2, int y2)
return
NULL
;
block
=
GetBlockmapBlock
(
x1
,
y1
);
if
(
!
block
)
return
NULL
;
if
(
freeiters
!=
NULL
)
{
...
...
@@ -1188,12 +1186,12 @@ mobj_t *P_BlockThingsIteratorNext(bthingit_t *it, boolean centeronly)
if
(
!
it
->
dynhash
)
{
it
->
dynhashcapacity
=
50
;
Z_Calloc
(
it
->
dynhashcapacity
*
sizeof
(
it
->
dynhash
capacity
),
PU_LEVEL
,
&
it
->
dynhash
);
Z_Calloc
(
it
->
dynhashcapacity
*
sizeof
(
*
it
->
dynhash
),
PU_LEVEL
,
&
it
->
dynhash
);
}
if
(
it
->
dynhashcount
==
it
->
dynhashcapacity
)
{
it
->
dynhashcapacity
*=
2
;
it
->
dynhash
=
Z_Realloc
(
it
->
dynhash
,
it
->
dynhashcapacity
*
sizeof
(
it
->
dynhash
capacity
),
PU_LEVEL
,
&
it
->
dynhash
);
it
->
dynhash
=
Z_Realloc
(
it
->
dynhash
,
it
->
dynhashcapacity
*
sizeof
(
*
it
->
dynhash
),
PU_LEVEL
,
&
it
->
dynhash
);
}
i
=
(
int
)
it
->
dynhashcount
;
it
->
dynhashcount
++
;
...
...
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