misc/libphyslayer/hwpacksmounter.h
author sheepluva
Fri, 06 Dec 2013 23:53:35 +0100
changeset 9760 395ca7fe6362
parent 8978 e6ef8fe314bd
child 9264 21df1a0ec9ed
child 9991 3858d99476f5
permissions -rw-r--r--
It seems that at the current state it is necessary to protect sending stats/ending game from multiple execution, as that can happen if you e.g. fail a mission more than once in the same tick (e.g. destroying two essential crates at the same time) Otherwise you can get a blank / stuck frontend (e.g. when using deagle to shoot the two last crates at the same time)! the best approach might be to never call the function that sends stats and ends game from any event handler directly, but instead have a flag 'isFailed' that is set to true when any of the possible fails happen and to check that flag every tick to send stats and end game if true

#ifndef HEDGEWARS_PACKAGES_MOUNTER_H
#define HEDGEWARS_PACKAGES_MOUNTER_H

#include "physfs.h"

#ifdef __cplusplus
extern "C" {
#endif

PHYSFS_DECL void hedgewarsMountPackages();
PHYSFS_DECL void hedgewarsMountPackage(char * fileName);

#ifdef __cplusplus
}
#endif

#endif