fix player heigth

This commit is contained in:
Askou
2021-06-17 11:18:42 +02:00
parent 9e1ebedf02
commit 6f9609a2f2
3 changed files with 2 additions and 2 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

+1 -1
View File
@@ -62,7 +62,7 @@ namespace BBM
{SoundComponent::BOMB, "assets/sounds/bomb_drop.ogg"},
//{SoundComponent::DEATH, "assets/sounds/death.ogg"}
};
return scene.addEntity("player")
.addComponent<PositionComponent>()
.addComponent<Drawable3DComponent, RAY3D::Model>("assets/player/player.iqm", true)
+1 -1
View File
@@ -214,7 +214,7 @@ namespace BBM
auto &player = Runner::createPlayer(*scene);
_addController(player, lobby.layout);
player.getComponent<PositionComponent>().position = Vector3f(mapWidth * (playerCount % 2),
0,
(Runner::hasHeights ? 1.01 : 0),
mapHeight * (!(playerCount % 3)));
auto *model = dynamic_cast<RAY3D::Model *>(player.getComponent<Drawable3DComponent>().drawable.get());
model->setTextureToMaterial(MAP_DIFFUSE, "assets/player/textures/" + _colors[lobby.color] + ".png");