1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-01-13 19:56:54 +00:00

Merge branch 'experimental' of file:///Users/User/code/coding/Aquaria_fg_clean into experimental

This commit is contained in:
fgenesis 2013-05-19 19:19:20 +01:00
commit 2de8622caa
2 changed files with 17 additions and 6 deletions

View file

@ -8402,9 +8402,9 @@ void Game::handleShotCollisions(Entity *e, bool hasShield)
{
BBGE_PROF(Game_handleShotCollisions);
bool isRegValid=true;
for (Shot::Shots::iterator i = Shot::shots.begin(); i != Shot::shots.end(); i++)
for (size_t i = 0; i < Shot::shots.size(); ++i)
{
Shot *shot = *i;
Shot *shot = Shot::shots[i];
if (shot->isActive() && isEntityCollideWithShot(e, shot) && (!hasShield || (!shot->shotData || !shot->shotData->ignoreShield)))
{
Vector collidePoint = e->position+e->offset;
@ -8434,9 +8434,9 @@ bool Game::isDamageTypeEnemy(DamageType dt)
void Game::handleShotCollisionsSkeletal(Entity *e)
{
BBGE_PROF(Game_HSSKELETAL);
for (Shot::Shots::iterator i = Shot::shots.begin(); i != Shot::shots.end(); i++)
for (size_t i = 0; i < Shot::shots.size(); ++i)
{
Shot *shot = *i;
Shot *shot = Shot::shots[i];
if (shot->isActive() && isEntityCollideWithShot(e, shot))
{
Bone *b = collideSkeletalVsCircle(e, shot->position, shot->collideRadius);
@ -8451,9 +8451,9 @@ void Game::handleShotCollisionsSkeletal(Entity *e)
void Game::handleShotCollisionsHair(Entity *e, int num)
{
for (Shot::Shots::iterator i = Shot::shots.begin(); i != Shot::shots.end(); i++)
for (size_t i = 0; i < Shot::shots.size(); ++i)
{
Shot *shot = *i;
Shot *shot = Shot::shots[i];
if (shot->isActive() && isEntityCollideWithShot(e, shot))
{
bool b = collideHairVsCircle(e, num, shot->position, 8);

View file

@ -3746,6 +3746,16 @@ luaFunc(beam_setDamage)
luaReturnNil();
}
luaFunc(beam_setDamageType)
{
Beam *b = beam(L);
if (b)
{
b->damageData.damageType = (DamageType)lua_tointeger(L, 2);
}
luaReturnNil();
}
luaFunc(beam_setBeamWidth)
{
Beam *b = beam(L);
@ -7950,6 +7960,7 @@ static const struct {
luaRegister(beam_setDamage),
luaRegister(beam_setBeamWidth),
luaRegister(beam_setFirer),
luaRegister(beam_setDamageType),
luaRegister(getStringBank),