mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-06-01 02:56:28 +03:00
Small fixes.
This commit is contained in:
@@ -229,11 +229,16 @@ cLightManager::LightsList& cLightManager::GetLights() {
|
||||
cLight * cLightManager::GetLightOver( const eeVector2f& OverPos, cLight * LightCurrent ) {
|
||||
cLight * PivotLight = NULL;
|
||||
cLight * LastLight = NULL;
|
||||
cLight * FirstLight = NULL;
|
||||
|
||||
for ( LightsList::reverse_iterator it = mLights.rbegin(); it != mLights.rend(); it++ ) {
|
||||
cLight * Light = (*it);
|
||||
|
||||
if ( Contains( Light->GetAABB(), OverPos ) ) {
|
||||
if ( NULL == FirstLight ) {
|
||||
FirstLight = Light;
|
||||
}
|
||||
|
||||
if ( NULL != LightCurrent ) {
|
||||
if ( Light != LightCurrent ) {
|
||||
PivotLight = Light;
|
||||
@@ -250,6 +255,10 @@ cLight * cLightManager::GetLightOver( const eeVector2f& OverPos, cLight * LightC
|
||||
}
|
||||
}
|
||||
|
||||
if ( LastLight == LightCurrent && NULL != FirstLight ) {
|
||||
return FirstLight;
|
||||
}
|
||||
|
||||
if ( NULL == PivotLight && NULL != LightCurrent && Contains( LightCurrent->GetAABB(), OverPos ) ) {
|
||||
return LightCurrent;
|
||||
}
|
||||
|
||||
@@ -1098,11 +1098,13 @@ void cMap::SaveToStream( cIOStream& IOS ) {
|
||||
}
|
||||
|
||||
void cMap::Save( const std::string& path ) {
|
||||
cIOStreamFile IOS( path, std::ios::out | std::ios::binary );
|
||||
if ( !IsDirectory( path ) ) {
|
||||
cIOStreamFile IOS( path, std::ios::out | std::ios::binary );
|
||||
|
||||
SaveToStream( IOS );
|
||||
SaveToStream( IOS );
|
||||
|
||||
mPath = path;
|
||||
mPath = path;
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<std::string> cMap::GetShapeGroups() {
|
||||
|
||||
Reference in New Issue
Block a user