newmap fullbright fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3024 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -465,7 +465,7 @@ VARF(fullbright, 0, 0, 1,
|
||||
if(fullbright)
|
||||
{
|
||||
if(noteditmode()) return;
|
||||
fullbrightlight(176);
|
||||
fullbrightlight();
|
||||
}
|
||||
else calclight();
|
||||
);
|
||||
|
||||
+1
-1
@@ -384,7 +384,7 @@ extern entity *newentity(int x, int y, int z, char *what, int v1, int v2, int v3
|
||||
// worldlight
|
||||
extern int lastcalclight;
|
||||
|
||||
extern void fullbrightlight(int level);
|
||||
extern void fullbrightlight(int level = -1);
|
||||
extern void calclight();
|
||||
extern void adddynlight(physent *owner, const vec &o, int reach, int expire, int fade, uchar r, uchar g = 0, uchar b = 0);
|
||||
extern void dodynlights();
|
||||
|
||||
@@ -352,7 +352,7 @@ bool empty_world(int factor, bool force) // main empty world creation routine
|
||||
execfile("config/default_map_settings.cfg");
|
||||
persistidents = true;
|
||||
popscontext();
|
||||
setvar("fullbright", 1, true);
|
||||
fullbrightlight();
|
||||
}
|
||||
}
|
||||
if(factor>=0)
|
||||
|
||||
@@ -142,8 +142,13 @@ void postlightarea(const block &a) // median filter, smooths out random noise
|
||||
|
||||
int lastcalclight = 0;
|
||||
|
||||
VARP(fullbrightlevel, 0, 176, 255);
|
||||
|
||||
void fullbrightlight(int level)
|
||||
{
|
||||
if(level < 0) level = fullbrightlevel;
|
||||
else level = min(level, 255);
|
||||
|
||||
loopi(mipsize) world[i].r = world[i].g = world[i].b = level;
|
||||
lastcalclight = totalmillis;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user