1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-23 10:52:38 +01:00

Re-add cutscene widescreen; eject occupants properly

This commit is contained in:
Daniel Evans 2015-01-23 17:44:28 +00:00
parent 1961661d14
commit a0eef23da8
3 changed files with 7 additions and 4 deletions

View File

@ -84,6 +84,8 @@ VehicleObject::VehicleObject(GameWorld* engine, const glm::vec3& pos, const glm:
VehicleObject::~VehicleObject()
{
ejectAll();
engine->dynamicsWorld->removeAction(physVehicle);
for(auto& p : dynamicParts)
@ -95,8 +97,6 @@ VehicleObject::~VehicleObject()
delete physVehicle;
delete physRaycaster;
ejectAll();
}
void VehicleObject::setPosition(const glm::vec3& pos)

View File

@ -494,7 +494,7 @@ void GameRenderer::renderWorld(const ViewCamera &camera, float alpha)
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
}
if( engine->state.isCinematic && splashTexName == 0 ) {
if( (engine->state.isCinematic || engine->state.currentCutscene ) && splashTexName == 0 ) {
renderLetterbox();
}

View File

@ -218,10 +218,13 @@ void game_fade_screen(const ScriptArguments& args)
args.getVM()->getWorld()->state.fadeTime = args[0].integer / 1000.f;
args.getVM()->getWorld()->state.fadeOut = !!args[1].integer;
args.getVM()->getWorld()->state.fadeStart = args.getVM()->getWorld()->gameTime;
std::cout << "Fade " << args[0].integer << " " << args[1].integer << std::endl;
}
bool game_screen_fading(const ScriptArguments& args)
{
if( args.getVM()->getWorld()->state.skipCutscene )
{
return false;
}
return args.getVM()->getWorld()->gameTime <
args.getVM()->getWorld()->state.fadeStart + args.getVM()->getWorld()->state.fadeTime;
}