mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Fix special/stdin.vvvvvv
being saved to levelstats.vvv
While fixing #885, I noticed that I had a bunch of `special/stdin.vvvvvv` entries saved in my `levelstats.vvv`. At once I knew that the dumb `special/stdin` hack that actually checks if the filename passed is `special/stdin` was to blame. STDIN playtesting was first merged, I knew in the back of my mind that it was a bit of a dumb hack, but I didn't know it would cause consequences like showing up in `levelstats.vvv`. For now, I'll just have to patch it, but hopefully in the future I'll remove the dumb hack entirely. Commenting both instances of the dumb hack with instructions to grep for it should help maintainers out.
This commit is contained in:
parent
550dfe676a
commit
c3750e3b34
2 changed files with 6 additions and 1 deletions
|
@ -571,6 +571,8 @@ void FILESYSTEM_loadFileToMemory(
|
|||
goto fail;
|
||||
}
|
||||
|
||||
/* FIXME: Dumb hack to use `special/stdin.vvvvvv` here...
|
||||
* This is also checked elsewhere... grep for `special/stdin`! */
|
||||
if (SDL_strcmp(name, "levels/special/stdin.vvvvvv") == 0)
|
||||
{
|
||||
// this isn't *technically* necessary when piping directly from a file, but checking for that is annoying
|
||||
|
|
|
@ -1965,7 +1965,10 @@ void Game::updatestate(void)
|
|||
case 1015:
|
||||
#if !defined(NO_CUSTOM_LEVELS)
|
||||
//Update level stats
|
||||
if(cl.numcrewmates()-crewmates()==0)
|
||||
/* FIXME: Have to add check to not save stats for the dumb hack
|
||||
* `special/stdin.vvvvvv` filename... see elsewhere, grep for
|
||||
* `special/stdin`! */
|
||||
if(cl.numcrewmates()-crewmates()==0 && customlevelfilename != "levels/special/stdin.vvvvvv")
|
||||
{
|
||||
//Finished level
|
||||
if (trinkets() >= cl.numtrinkets())
|
||||
|
|
Loading…
Reference in a new issue