mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge public master
This commit is contained in:
commit
c647295ef1
3 changed files with 30 additions and 1 deletions
19
.gitlab/issue_templates/Default.md
Normal file
19
.gitlab/issue_templates/Default.md
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
# What version of Ring Racers are you playing?
|
||||||
|
|
||||||
|
(Replace this text with the version number. You can see this on the title screen at the bottom-left corner.)
|
||||||
|
|
||||||
|
# What is the fastest way to trigger the bug?
|
||||||
|
|
||||||
|
(Bugs that can't be reproduced are extremely hard to fix. If you can't make it happen on demand, try and describe the circumstances where it triggers.)
|
||||||
|
|
||||||
|
# What is the bugged behavior?
|
||||||
|
|
||||||
|
(Describe what happens when you encounter the bug.)
|
||||||
|
|
||||||
|
# What do you expect to happen instead?
|
||||||
|
|
||||||
|
(Describe what should be happening instead of the bugged behavior.)
|
||||||
|
|
||||||
|
# Logs, videos, or screenshots that showcase the issue
|
||||||
|
|
||||||
|
(For crash bugs, look for an .RPT file, or your `latest-log.txt`. You can drag it directly into this window.)
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
|
|
||||||
#include "../cxxutil.hpp"
|
#include "../cxxutil.hpp"
|
||||||
#include "../z_zone.h"
|
#include "../z_zone.h"
|
||||||
|
#include "../lua_script.h"
|
||||||
|
|
||||||
using namespace srb2;
|
using namespace srb2;
|
||||||
|
|
||||||
|
|
@ -117,6 +118,9 @@ void* PoolAllocator::allocate()
|
||||||
|
|
||||||
void PoolAllocator::deallocate(void* p)
|
void PoolAllocator::deallocate(void* p)
|
||||||
{
|
{
|
||||||
|
// Required in case this block is reused
|
||||||
|
LUA_InvalidateUserdata(p);
|
||||||
|
|
||||||
FreeBlock* block = reinterpret_cast<FreeBlock*>(p);
|
FreeBlock* block = reinterpret_cast<FreeBlock*>(p);
|
||||||
block->next = head_;
|
block->next = head_;
|
||||||
head_ = block;
|
head_ = block;
|
||||||
|
|
@ -127,6 +131,12 @@ void PoolAllocator::release()
|
||||||
ChunkFooter* next = nullptr;
|
ChunkFooter* next = nullptr;
|
||||||
for (ChunkFooter* i = first_chunk_; i != nullptr; i = next)
|
for (ChunkFooter* i = first_chunk_; i != nullptr; i = next)
|
||||||
{
|
{
|
||||||
|
uint8_t *chunk = (uint8_t*)i->start;
|
||||||
|
for (size_t j = 0; j < blocks_; j++)
|
||||||
|
{
|
||||||
|
// Invalidate all blocks that possibly weren't passed to deallocate
|
||||||
|
LUA_InvalidateUserdata(chunk + (j * block_size_));
|
||||||
|
}
|
||||||
next = i->next;
|
next = i->next;
|
||||||
Z_Free(i->start);
|
Z_Free(i->start);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ struct Particle : Mobj
|
||||||
skins[pskinn]->sprites[states[spr2state].frame].numframes > 0)
|
skins[pskinn]->sprites[states[spr2state].frame].numframes > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
x->skin = (void*)(&skins[pskinn]);
|
x->skin = (void*)(skins[pskinn]);
|
||||||
x->state(spr2state);
|
x->state(spr2state);
|
||||||
//frame will be set by state()
|
//frame will be set by state()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue