This patch allow to no update a shadow during game, for example for foliages, case where the user doesn't want to make a shadow bake for each object in the scene.
A simple option named "static shadow" is added in lamp UI panel and a variable named "staticShadow" in KX_LightObject.
But the user can also request a shadow update for the next frame with the python function : "updateShadow" in KX_LightObject.
# set this lamp as static, so no update sun.staticShadow = True # request a shadow update only for the next frame sun.updateShadow()
demo file :
variance shadow + dynamic shadow on player :
Press space to update shadow for one frame.