Fixed Linux build.
This commit is contained in:
parent
6ebbb48f9f
commit
037ea592ab
@ -76,7 +76,7 @@ ifeq "$(USEMETA)" "true"
|
|||||||
CFLAGS += -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_LEFT4DEAD=4
|
CFLAGS += -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_LEFT4DEAD=4
|
||||||
else
|
else
|
||||||
INCLUDE += -I. -I.. -Isdk -I$(SMSDK)/public -I$(SMSDK)/public/sourcepawn \
|
INCLUDE += -I. -I.. -Isdk -I$(SMSDK)/public -I$(SMSDK)/public/sourcepawn \
|
||||||
-I$(SMSDK)/public/extensions
|
-I$(SMSDK)/public/extensions -I$(MMSOURCE17)/core/sourcehook
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LINK += -m32 -lm -ldl
|
LINK += -m32 -lm -ldl
|
||||||
|
@ -37,6 +37,8 @@
|
|||||||
#include <sh_string.h>
|
#include <sh_string.h>
|
||||||
#include "MemoryDownloader.h"
|
#include "MemoryDownloader.h"
|
||||||
|
|
||||||
|
using namespace SourceHook;
|
||||||
|
|
||||||
struct UpdatePart
|
struct UpdatePart
|
||||||
{
|
{
|
||||||
UpdatePart* next;
|
UpdatePart* next;
|
||||||
|
@ -159,12 +159,18 @@ static void PumpUpdate(void *data)
|
|||||||
AddUpdateError("Could not open %s for writing", path);
|
AddUpdateError("Could not open %s for writing", path);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fwrite(part->data, 1, part->length, fp);
|
if (fwrite(part->data, 1, part->length, fp) != part->length)
|
||||||
|
{
|
||||||
|
AddUpdateError("Could not write file %s", path);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
smutils->LogMessage(myself,
|
||||||
|
"Successfully updated gamedata file \"%s\"",
|
||||||
|
part->file);
|
||||||
|
new_files = true;
|
||||||
|
}
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
smutils->LogMessage(myself,
|
|
||||||
"Successfully updated gamedata file \"%s\"",
|
|
||||||
part->file);
|
|
||||||
new_files = true;
|
|
||||||
}
|
}
|
||||||
skip_create:
|
skip_create:
|
||||||
temp = part->next;
|
temp = part->next;
|
||||||
|
Loading…
Reference in New Issue
Block a user