mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-05-31 02:57:32 +02:00
Merge
This commit is contained in:
commit
c4a500aa21
@ -10,8 +10,8 @@ public:
|
|||||||
std::string URL;
|
std::string URL;
|
||||||
std::map<std::string, std::string> PostData;
|
std::map<std::string, std::string> PostData;
|
||||||
void * HTTPContext;
|
void * HTTPContext;
|
||||||
APIRequest(std::string url, APIResultParser * parser, ListenerHandle listener = ListenerHandle(0, 0));
|
APIRequest(std::string url, APIResultParser * parser, ListenerHandle listener = ListenerHandle(0, (RequestListener*)0));
|
||||||
APIRequest(std::string url, std::map<std::string, std::string>, APIResultParser * parser, ListenerHandle listener = ListenerHandle(0, 0));
|
APIRequest(std::string url, std::map<std::string, std::string>, APIResultParser * parser, ListenerHandle listener = ListenerHandle(0, (RequestListener*)0));
|
||||||
virtual RequestBroker::ProcessResponse Process(RequestBroker & rb);
|
virtual RequestBroker::ProcessResponse Process(RequestBroker & rb);
|
||||||
virtual ~APIRequest();
|
virtual ~APIRequest();
|
||||||
virtual void Cleanup();
|
virtual void Cleanup();
|
||||||
|
@ -75,7 +75,7 @@ int Element_DTEC::update(UPDATE_FUNC_ARGS)
|
|||||||
}
|
}
|
||||||
for (rx=-rd; rx<rd+1; rx++)
|
for (rx=-rd; rx<rd+1; rx++)
|
||||||
for (ry=-rd; ry<rd+1; ry++)
|
for (ry=-rd; ry<rd+1; ry++)
|
||||||
if (BOUNDS_CHECK && (rx || ry))
|
if (x+rx>=0 && y+ry>=0 && x+rx<XRES && y+ry<YRES && (rx || ry))
|
||||||
{
|
{
|
||||||
r = pmap[y+ry][x+rx];
|
r = pmap[y+ry][x+rx];
|
||||||
if(!r)
|
if(!r)
|
||||||
|
@ -75,7 +75,7 @@ int Element_TSNS::update(UPDATE_FUNC_ARGS)
|
|||||||
}
|
}
|
||||||
for (rx=-rd; rx<rd+1; rx++)
|
for (rx=-rd; rx<rd+1; rx++)
|
||||||
for (ry=-rd; ry<rd+1; ry++)
|
for (ry=-rd; ry<rd+1; ry++)
|
||||||
if (BOUNDS_CHECK && (rx || ry))
|
if (x+rx>=0 && y+ry>=0 && x+rx<XRES && y+ry<YRES && (rx || ry))
|
||||||
{
|
{
|
||||||
r = pmap[y+ry][x+rx];
|
r = pmap[y+ry][x+rx];
|
||||||
if(!r)
|
if(!r)
|
||||||
|
@ -131,8 +131,8 @@ int Element_VIBR::update(UPDATE_FUNC_ARGS) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Neighbor check loop
|
//Neighbor check loop
|
||||||
for (rx=-1; rx<2; rx++)
|
for (rx=-2; rx<3; rx++)
|
||||||
for (ry=-1; ry<2; ry++)
|
for (ry=-2; ry<3; ry++)
|
||||||
if (BOUNDS_CHECK && (rx || ry))
|
if (BOUNDS_CHECK && (rx || ry))
|
||||||
{
|
{
|
||||||
r = pmap[y+ry][x+rx];
|
r = pmap[y+ry][x+rx];
|
||||||
@ -141,7 +141,7 @@ int Element_VIBR::update(UPDATE_FUNC_ARGS) {
|
|||||||
if (!r)
|
if (!r)
|
||||||
continue;
|
continue;
|
||||||
//Melts into EXOT
|
//Melts into EXOT
|
||||||
if ((r&0xFF) == PT_EXOT && !(rand()%83) && !parts[i].life)
|
if ((r&0xFF) == PT_EXOT && !(rand()%250) && !parts[i].life)
|
||||||
{
|
{
|
||||||
sim->create_part(i, x, y, PT_EXOT);
|
sim->create_part(i, x, y, PT_EXOT);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user