mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-09 23:41:09 -04:00
1 less error when compiling as C++
also fix mistake in readme (thanks kylbert)
This commit is contained in:
parent
7c977a275b
commit
2016b4ef7f
@ -18,7 +18,7 @@ It **does not** work with 'modern/premium' Minecraft servers.
|
|||||||
* macOS: macOS 10.5 or later. (Can be compiled to work with 10.3/10.4 though)
|
* macOS: macOS 10.5 or later. (Can be compiled to work with 10.3/10.4 though)
|
||||||
* Linux: libcurl and libopenal.
|
* Linux: libcurl and libopenal.
|
||||||
|
|
||||||
**Note:** When running from within VirtualBox, disable Mouse Integration, otherwise the camera will not work propery.
|
**Note:** When running from within VirtualBox, disable Mouse Integration, otherwise the camera will not work properly.
|
||||||
|
|
||||||
#### Instructions
|
#### Instructions
|
||||||
Initially, you will need to run ClassiCube.exe to download the required assets from minecraft.net.
|
Initially, you will need to run ClassiCube.exe to download the required assets from minecraft.net.
|
||||||
|
@ -127,8 +127,8 @@ static void Http_Add(const String* url, cc_bool priority, const String* id, cc_u
|
|||||||
Mem_Copy(req.data, data, size);
|
Mem_Copy(req.data, data, size);
|
||||||
req.size = size;
|
req.size = size;
|
||||||
}
|
}
|
||||||
req.cookies = cookies;
|
req.cookies = cookies;
|
||||||
req.timeAdded = DateTime_CurrentUTC_MS();
|
req._timeAdded = Stopwatch_Measure();
|
||||||
|
|
||||||
Mutex_Lock(pendingMutex);
|
Mutex_Lock(pendingMutex);
|
||||||
{
|
{
|
||||||
@ -193,7 +193,7 @@ static void Http_CompleteRequest(struct HttpRequest* req) {
|
|||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
/* very rare case - priority item was inserted, then inserted again (so put before first item), */
|
/* very rare case - priority item was inserted, then inserted again (so put before first item), */
|
||||||
/* and both items got downloaded before an external function removed them from the queue */
|
/* and both items got downloaded before an external function removed them from the queue */
|
||||||
if (older.timeAdded > req->timeAdded) {
|
if (older._timeAdded > req->_timeAdded) {
|
||||||
HttpRequest_Free(req);
|
HttpRequest_Free(req);
|
||||||
} else {
|
} else {
|
||||||
/* normal case, replace older req */
|
/* normal case, replace older req */
|
||||||
|
@ -22,7 +22,7 @@ enum HttpProgress {
|
|||||||
struct HttpRequest {
|
struct HttpRequest {
|
||||||
char url[URL_MAX_SIZE]; /* URL data is downloaded from/uploaded to. */
|
char url[URL_MAX_SIZE]; /* URL data is downloaded from/uploaded to. */
|
||||||
char id[URL_MAX_SIZE]; /* Unique identifier for this request. */
|
char id[URL_MAX_SIZE]; /* Unique identifier for this request. */
|
||||||
TimeMS timeAdded; /* Time this request was added to queue of requests. */
|
cc_uint64 _timeAdded; /* Timestamp this request was added to requests queue. */
|
||||||
TimeMS timeDownloaded; /* Time response contents were completely downloaded. */
|
TimeMS timeDownloaded; /* Time response contents were completely downloaded. */
|
||||||
int statusCode; /* HTTP status code returned in the response. */
|
int statusCode; /* HTTP status code returned in the response. */
|
||||||
cc_uint32 contentLength; /* HTTP content length returned in the response. */
|
cc_uint32 contentLength; /* HTTP content length returned in the response. */
|
||||||
|
@ -1458,11 +1458,8 @@ static void CPE_DefineModel(cc_uint8* data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cm->numParts = numParts;
|
cm->numParts = numParts;
|
||||||
cm->model.vertices = Mem_AllocCleared(
|
cm->model.vertices = (struct ModelVertex*)Mem_AllocCleared(numParts * MODEL_BOX_VERTICES,
|
||||||
numParts * MODEL_BOX_VERTICES,
|
sizeof(struct ModelVertex), "CustomModel vertices");
|
||||||
sizeof(struct ModelVertex),
|
|
||||||
"CustomModel vertices"
|
|
||||||
);
|
|
||||||
cm->defined = true;
|
cm->defined = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user