Skip to content
Snippets Groups Projects
Commit 97d6c6ec authored by dg's avatar dg
Browse files

Bad shaders should not crash the engine, just not work

git-svn-id: http://svn.net-core.org/repos/t-engine4@913 51575b47-30f0-44d4-a5cc-537603b46e54
parent 9aac7965
No related branches found
No related tags found
No related merge requests found
......@@ -175,6 +175,7 @@ newTalent{
return ([[Touch your foe and turn it into stone for %d turns.
Stoned creatures are unable to act or regen life and are very brittle.
If a stoned creature if hit by an attack that deals more than 30%% of its life it will shatter and be destroyed.
Stoned creatures are highly resistant to fire and lightning and somewhat resistant to physical attacks.
At level 3 it will become a beam.]]):format(math.floor((3 + self:getTalentLevel(t)) / 1.5))
end,
}
......@@ -130,10 +130,16 @@ newEffect{
on_lose = function(self, err) return "#Target# is not stoned anymore.", "-Stoned" end,
activate = function(self, eff)
eff.tmpid = self:addTemporaryValue("stoned", 1)
eff.resistsid = self:addTemporaryValue("resists", {
[DamageType.PHYSICAL]=20,
[DamageType.FIRE]=80,
[DamageType.LIGHTNING]=50,
})
eff.dur = self:updateEffectDuration(eff.dur, "stun")
end,
deactivate = function(self, eff)
self:removeTemporaryValue("stoned", eff.tmpid)
self:removeTemporaryValue("resists", eff.resistsid)
end,
}
......
......@@ -118,16 +118,16 @@ bool _CheckGLSLProgramValid(GLuint program)
#define CHECKGLSLCOMPILE( Shader, file ) \
if(!_CheckGLSLShaderCompile( Shader , file)) \
exit(-1);
return(0);
#define CHECKGLSLLINK( Program ) \
if(!_CheckGLSLProgramLink( Program )) \
exit(-1);
return(0);
#define CHECKGLSLVALID( Program ) \
glValidateProgramARB( Program ); \
if(!_CheckGLSLProgramValid( Program )) \
exit(-1);
return(0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment