mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-06-22 18:55:43 +00:00
restructure codebase according to vcproj filters
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
#include "../../../../../Minecraft.World/Header Files/stdafx.h"
|
||||
|
||||
#include "../../../../net/minecraft/client/Minecraft.h"
|
||||
#include "../../../../net/minecraft/client/multiplayer/MultiPlayerLocalPlayer.h"
|
||||
#include "AreaHint.h"
|
||||
#include "../../../../../Minecraft.World/net/minecraft/world/phys/AABB.h"
|
||||
#include "../Tutorial.h"
|
||||
|
||||
AreaHint::AreaHint(eTutorial_Hint id, Tutorial* tutorial,
|
||||
eTutorial_State displayState, eTutorial_State completeState,
|
||||
int descriptionId, double x0, double y0, double z0,
|
||||
double x1, double y1, double z1, bool allowFade /*= false*/,
|
||||
bool contains /*= true*/)
|
||||
: TutorialHint(id, tutorial, descriptionId, e_Hint_Area, allowFade) {
|
||||
area = AABB(x0, y0, z0, x1, y1, z1);
|
||||
|
||||
this->contains = contains;
|
||||
|
||||
m_displayState = displayState;
|
||||
m_completeState = completeState;
|
||||
}
|
||||
|
||||
int AreaHint::tick() {
|
||||
Minecraft* minecraft = Minecraft::GetInstance();
|
||||
Vec3 player_pos = minecraft->player->getPos(1);
|
||||
|
||||
if ((m_displayState == e_Tutorial_State_Any ||
|
||||
m_tutorial->getCurrentState() == m_displayState) &&
|
||||
m_hintNeeded && area.contains(player_pos) == contains) {
|
||||
if (m_completeState == e_Tutorial_State_None) {
|
||||
m_hintNeeded = false;
|
||||
} else if (m_tutorial->isStateCompleted(m_completeState)) {
|
||||
m_hintNeeded = false;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return m_descriptionId;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user