some 'fixes', better solution: change to what it was before the neutron fix.
This commit is contained in:
parent
24d5ca7d4e
commit
fdd3d24031
2
Makefile
2
Makefile
@ -30,7 +30,7 @@ powder-64-sse3-opengl: $(SOURCES)
|
||||
$(COMPILER) -m64 -o$@ $(CFLAGS) $(OFLAGS) $(LFLAGS) $(MFLAGS_SSE3) $(SOURCES) -DLIN64 -lGL -lGLU -DOpenGL
|
||||
strip $@
|
||||
powder-64-sse3: $(SOURCES)
|
||||
$(COMPILER) -m64 -o$@ $(CFLAGS) $(OFLAGS) $(LFLAGS) $(MFLAGS_SSE3) $(SOURCES) -DLIN64
|
||||
$(COMPILER) -m64 -o$@ $(CFLAGS) $(OFLAGS) $(LFLAGS) $(MFLAGS_SSE3) $(SOURCES) -DLIN64 -j3
|
||||
strip $@
|
||||
mv $@ build
|
||||
powder-64-sse2: $(SOURCES)
|
||||
|
0
src/main.c
Executable file → Normal file
0
src/main.c
Executable file → Normal file
31
src/powder.c
31
src/powder.c
@ -71,14 +71,11 @@ static int eval_move(int pt, int nx, int ny, unsigned *rr)
|
||||
if((r&0xFF)==PT_VOID || (r&0xFF)==PT_BHOL)
|
||||
return 1;
|
||||
|
||||
if(pt==PT_NEUT && (r&0xFF)==PT_GLAS)
|
||||
return 2;
|
||||
|
||||
if(pt==PT_PHOT&&(
|
||||
(r&0xFF)==PT_GLAS || (r&0xFF)==PT_PHOT ||
|
||||
(r&0xFF)==PT_CLNE || (r&0xFF)==PT_PCLN ||
|
||||
(r&0xFF)==PT_GLOW ||
|
||||
(r&0xFF)==PT_WATR || (r&0xFF)==PT_DSTW || (r&0xFF)==PT_SLTW ||
|
||||
(r&0xFF)==PT_GLOW || (r&0xFF)==PT_WATR ||
|
||||
(r&0xFF)==PT_DSTW || (r&0xFF)==PT_SLTW ||
|
||||
((r&0xFF)==PT_LCRY&&parts[r>>8].life > 5)))
|
||||
return 2;
|
||||
|
||||
@ -99,10 +96,12 @@ static int eval_move(int pt, int nx, int ny, unsigned *rr)
|
||||
return 0;
|
||||
|
||||
if(pt == PT_PHOT)
|
||||
return 2;
|
||||
|
||||
return 0;
|
||||
if(pt == PT_NEUT)
|
||||
return 1;
|
||||
if(pt == PT_NEUT && (r&0xFF == PT_WATR||r&0xFF == PT_SLTW ||r&0xFF == PT_DSTW))
|
||||
return 2;
|
||||
|
||||
if((r&0xFF) == PT_NEUT)
|
||||
return 0;
|
||||
|
||||
@ -131,22 +130,28 @@ int try_move(int i, int x, int y, int nx, int ny)
|
||||
(pmap[y][x]&0xFF)==PT_BMTL))
|
||||
e = 2;
|
||||
|
||||
if(!e) {
|
||||
if(!legacy_enable && parts[i].type==PT_PHOT) {
|
||||
if(!e)
|
||||
{
|
||||
if(!legacy_enable && parts[i].type==PT_PHOT)
|
||||
{
|
||||
if((r & 0xFF) == PT_COAL || (r & 0xFF) == PT_BCOL)
|
||||
parts[r>>8].temp = parts[i].temp;
|
||||
|
||||
if((r & 0xFF) < PT_NUM)
|
||||
parts[i].temp = parts[r>>8].temp =
|
||||
restrict_flt((parts[r>>8].temp+parts[i].temp)/2, MIN_TEMP, MAX_TEMP);
|
||||
parts[i].temp = parts[r>>8].temp = restrict_flt((parts[r>>8].temp+parts[i].temp)/2, MIN_TEMP, MAX_TEMP);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
if(e == 2) {
|
||||
|
||||
if(e == 2)
|
||||
{
|
||||
if(parts[i].type == PT_PHOT && (r&0xFF)==PT_GLOW && !parts[r>>8].life)
|
||||
if(rand() < RAND_MAX/30) {
|
||||
if(rand() < RAND_MAX/30)
|
||||
{
|
||||
parts[r>>8].life = 120;
|
||||
create_gain_photon(i);
|
||||
}
|
||||
|
||||
if(parts[i].type == PT_NEUT && (r&0xFF)==PT_GLAS) {
|
||||
if(rand() < RAND_MAX/10)
|
||||
create_cherenkov_photon(i);
|
||||
|
Reference in New Issue
Block a user