ofs | hex dump | ascii |
---|
0000 | 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 02 00 00 00 01 00 08 03 00 00 00 f2 4e 3e | .PNG........IHDR..............N> |
0020 | 55 00 00 00 04 67 41 4d 41 00 00 b1 8f 0b fc 61 05 00 00 00 01 73 52 47 42 00 ae ce 1c e9 00 00 | U....gAMA......a.....sRGB....... |
0040 | 00 20 63 48 52 4d 00 00 7a 26 00 00 80 84 00 00 fa 00 00 00 80 e8 00 00 75 30 00 00 ea 60 00 00 | ..cHRM..z&..............u0...`.. |
0060 | 3a 98 00 00 17 70 9c ba 51 3c 00 00 00 3c 50 4c 54 45 00 00 00 ff ff ff c6 c6 c6 bd bd bd e7 e7 | :....p..Q<...<PLTE.............. |
0080 | e7 de de de a5 a5 a5 ad b5 ad 8c 8c 8c f7 f7 f7 ce ce ce ef ef ef 94 9c 94 d6 d6 d6 7b 7b 7b 63 | ............................{{{c |
00a0 | 63 63 ce d6 ce d6 de d6 e7 ef e7 ad ad ad 59 ee 89 87 00 00 00 01 74 52 4e 53 00 40 e6 d8 66 00 | cc............Y.......tRNS.@..f. |
00c0 | 00 00 01 62 4b 47 44 01 ff 02 2d de 00 00 00 09 70 48 59 73 00 00 00 48 00 00 00 48 00 46 c9 6b | ...bKGD...-.....pHYs...H...H.F.k |
00e0 | 3e 00 00 41 c3 49 44 41 54 78 da ec bd 6b 83 ac a8 12 ae f9 40 48 10 22 97 33 33 ff ff bf ce 87 | >..A.IDATx...k......@H.".33..... |
0100 | 00 35 b3 32 ab 6a ad 5e dd bb f7 d9 45 15 8a a6 22 42 08 bc c4 0d 7e c2 4f 80 40 20 40 14 08 b0 | .5.2.j.^....E..."B....~.O.@.@... |
0120 | 6d 90 42 80 80 a2 e4 90 1f af b6 84 ee bb 12 02 84 10 0a 21 ec 11 d8 02 21 84 80 1e 21 10 42 d8 | m.B................!....!...!.B. |
0140 | 89 21 44 52 08 f2 e2 91 9b ef b7 0d 42 08 91 ea 77 1d ea 99 dc 72 82 40 08 01 08 81 60 3b 04 80 | .!DR........B...w....r.@....`;.. |
0160 | 10 63 20 44 c2 2a 4d 68 67 2a 11 67 26 7e fb d1 fb 41 22 51 4a 29 6c 65 f3 f2 05 21 83 04 6a a9 | .c.D.*Mhg*.g&~...A"QJ)le...!..j. |
0180 | 00 e4 55 1f 0f 95 33 4b 1a ee c7 61 56 9b 97 ea 3b 55 fc 45 d8 02 e1 ac 95 95 3f a4 00 90 52 22 | ..U...3K...aV...;U.E......?...R" |
01a0 | 78 05 fb cf fb 73 f6 81 cd ef dd 23 61 5b 2f b2 87 f3 e7 f9 fb aa 47 6e cf 5a a5 4b 21 b0 85 c0 | x....s.....#a[/.......Gn.Z.K!... |
01c0 | 16 32 92 e7 73 76 27 80 7b f9 93 b1 6f 7d b5 43 df 81 11 a0 94 59 21 bb fa bd c6 3e c6 4e 0a db | .2..sv'.{...o}.C.....Y!....>.N.. |
01e0 | 6c 06 b4 11 42 a0 29 f4 82 86 c8 d8 f7 41 60 04 76 03 02 7d 9f b5 3a b3 60 de ba aa 3d 1c b6 08 | l...B.)......A`.v..}..:.`...=... |
0200 | 60 db 02 e1 a8 81 bd f7 dd 09 60 ef 3d 38 51 6e 9b 8c eb de 18 63 24 85 cd ab 41 83 82 ee 9d 00 | `.........`.=8Qn.....c$...A..... |
0220 | fa a1 bd 43 21 a4 10 c9 7b 08 c4 90 02 12 c2 41 08 01 09 5b 20 a4 d0 26 f1 13 ea e6 c5 09 db ee | ...C!...{......A...[...&........ |
0240 | 3f 48 08 e2 f7 c7 90 02 61 a7 3d 90 62 aa 35 d1 48 94 6d 2b 24 95 46 08 61 7b 7c 4d 20 f8 f3 d7 | ?H......a.=.b.5.H.m+$.F.a{|M.... |
0260 | 7b 87 40 60 53 00 09 c2 16 c8 e7 67 29 fe 81 6d 33 93 40 48 ab da c2 49 00 81 6d 23 67 c2 7c 97 | {.@`S......g)..m3.@H...I..m#g.|. |
0280 | 83 70 1c 1f a8 28 21 41 c8 61 63 df d2 36 09 60 65 b0 28 c7 12 5e e5 04 e8 65 ef 5e 69 25 f9 87 | .p...(!A.ac..6.`e.(..^...e.^i%.. |
02a0 | 1a 09 5b 48 b0 65 28 21 14 40 27 bd 06 9d 4f d2 00 07 7b df c9 21 e4 d9 76 17 01 9c 3d c0 de 57 | ..[H.e(!.@'...O...{..!..v...=..W |
02c0 | ea 22 80 70 12 c0 71 04 82 ed 8b 00 80 95 8a 05 2c ee 57 ad f6 e3 e8 a4 94 e0 38 bc 72 6c ef 9e | .".p..q.........,.W.......8.rl.. |
02e0 | 8f 3e 51 77 08 81 30 46 20 18 cc 54 9f 24 e9 47 67 4b 05 c2 51 e6 2f 67 57 35 c6 c3 06 72 4a b7 | .>Qw..0F...T.$.GgK..Q./gW5...rJ. |
0300 | f6 d5 94 94 14 66 49 ec d8 07 b6 0b 84 03 02 1c 67 67 47 18 f3 63 4d 89 11 06 a0 c7 ad 2d bc 31 | .....fI.........ggG..cM......-.1 |
0320 | 09 81 20 01 ee cd b4 3e 6a ff f5 f6 72 39 c3 91 02 1c 7b f4 c4 43 0f 10 23 84 f9 95 94 70 24 40 | .......>j...r9....{..C..#....p$@ |
0340 | d1 c7 1e 89 40 32 ce ae f6 6c ac 74 a6 22 12 42 a2 34 af cd 34 bb f5 e7 1e 80 c0 5e 60 eb 7d f3 | ....@2...l.t.".B.4..4......^`.}. |
0360 | fb 9f 87 00 00 3d 42 ba 86 80 10 42 23 e4 c4 79 45 20 10 d7 10 00 a0 7b c8 04 c6 e1 25 21 e0 9f | .....=B....B#..yE......{....%!.. |
0380 | 24 c7 01 31 17 4a 8c 05 02 ec 21 04 82 40 46 1e 09 20 85 0f 3d c0 fa 16 e3 d9 99 4d a2 0c 6c 65 | $..1.J....!..@F.....=......M..le |
03a0 | 8d 7d fe c3 73 0f 80 bf 1d 5b a0 85 14 66 49 4a f4 1e 80 23 cf a2 bc e9 01 82 13 80 67 ef 9d b6 | .}..s....[...fIJ...#........g... |
03c0 | 04 79 2c b2 9c 43 ec 03 01 ec c7 f6 30 3a 9d a3 47 99 07 7b f9 b5 b1 aa e8 5f 9a 67 7c bc 5d f7 | .y,..C......0:..G..{....._.g|.]. |
03e0 | f6 e7 a7 33 2a bf 3d 11 fa 7a 2c 77 aa 7a 9e c6 bc af c4 af 33 dc de cd 01 3e de 1e 7e 75 5e b7 | ...3*.=..z,w.z......3....>..~u^. |
0400 | c2 be ff cc 72 7f c2 67 21 5e 9b b8 08 26 04 e6 78 f9 ee 32 ff 5e e2 8c e5 03 cd 5d 97 3f 67 fb | ....r..g!^...&..x..2.^.....].?g. |
0420 | 31 c3 5b 8e f1 bf 0b 3e 9d ef b3 6d af eb f5 7a bd a7 ef f2 3a 17 e3 37 73 7e d5 07 bc ca e6 f3 | 1.[....>...m...z....:..7s~...... | /*
Minetest
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef CONTENT_CAO_HEADER
#define CONTENT_CAO_HEADER
#include <map>
#include "irrlichttypes_extrabloated.h"
#include "clientobject.h"
#include "object_properties.h"
#include "itemgroup.h"
class Camera;
class Client;
struct Nametag;
/*
SmoothTranslator
*/
struct SmoothTranslator
{
v3f vect_old;
v3f vect_show;
v3f vect_aim;
f32 anim_counter;
f32 anim_time;
f32 anim_time_counter;
bool aim_is_end;
SmoothTranslator();
void init(v3f vect);
void sharpen();
0640 | d9 3f 9e 2d 6f fb 9c 17 45 89 7c 52 a8 2b af 72 ab d2 c8 67 18 f1 8f 2d 90 bd 5f db 0a b7 61 17 | .?.-o...E.|R.+.r...g...-.._...a. |
0660 | f6 7d 0d e6 be df 36 ce 49 43 08 17 b9 9c 5c 25 91 1b 87 ee 7a 8f 5b ae 10 ca e2 b2 5c 0c 29 c6 | .}....6.IC....\%....z.[.....\.). |
0680 | fc 2d 32 c1 52 88 2b 93 10 99 88 66 81 8d b2 fa 2e 9f 46 84 30 53 0e 76 f6 5d c9 b2 56 f2 cf 29 | .-2.R.+....f......F.0S.v.]..V..) |
06a0 | 44 5e 53 89 b9 17 71 26 61 9e 38 73 3d 23 5e 8b 80 d7 d9 87 b7 0e 85 c7 f5 da fd 62 34 ac 73 db | D^S...q&a.8s=#^............b4.s. |
06c0 | b6 30 56 3c d1 56 16 ee c3 6d 22 81 c0 56 36 c7 96 27 5f 32 cf 42 ee 67
//
scene::ISceneManager *m_smgr;
IrrlichtDevice *m_irr;
Client *m_client;
aabb3f m_selection_box;
scene::IMeshSceneNode *m_meshnode;
scene::IAnimatedMeshSceneNode *m_animated_meshnode;
WieldMeshSceneNode *m_wield_meshnode;
scene::IBillboardSceneNode *m_spritenode;
Nametag* m_nametag;
v3f m_position;
v3f m_velocity;
v3f m_acceleration;
float m_yaw;
s16 m_hp;
SmoothTranslator pos_translator;
// Spritesheet/animation stuff
v2f m_tx_size;
v2s16 m_tx_basepos;
bool m_initial_tx_basepos_set;
bool m_tx_select_horiz_by_yawpitch;
v2s32 m_animation_range;
int m_animation_speed;
int m_animation_blend;
bool m_animation_loop;
UNORDERED_MAP<std::string, core::vector2d<v3f> > m_bone_position; // stores position and rotation for each bone name
std::string m_attachment_bone;
v3f m_attachment_position;
v3f m_attachment_rotation;
bool m_attached_to_local;
int m_anim_frame;
int m_anim_num_frames;
float m_anim_framelength;
float m_anim_timer;
ItemGroupList m_armor_groups;
float m_reset_textures_timer;
std::string m_previous_texture_modifier; // stores texture modifier before punch update
std::string m_current_texture_modifier; // last applied texture modifier
bool m_visuals_expired;
float m_step_distance_counter;
u8 m_last_light;
bool m_is_visible;
std::vector<u16> m_children;
public:
GenericCAO(Client *client, ClientEnvironment *env);
~GenericCAO();
static ClientActiveObject* create(Client *client, ClientEnvironment *env)
{
return new GenericCAO(client, env);
}
inline ActiveObjectType getType() const
{
return ACTIVEOBJECT_TYPE_GENERIC;
}
void initialize(const std::string &data);
void processInitData(const std::string &data);
ClientActiveObject *getParent();
bool getCollisionBox(aabb3f *toset) const;
bool collideWithObjects() const;
aabb3f *getSelectionBox();
v3f getPosition();
inline float getYaw() const
{
return m_yaw;
}
scene::ISceneNode *getSceneNode();
scene::IMeshSceneNode *getMeshSceneNode();
scene::IAnimatedMeshSceneNode *getAnimatedMeshSceneNode();
WieldMeshSceneNode *getWieldMeshSceneNode();
scene::IBillboardSceneNode *getSpriteSceneNode();
inline bool isPlayer() const
{
return m_is_player;
}
inline bool isLocalPlayer() const
{
return m_is_local_player;
}
inline bool isVisible() const
{
return m_is_visible;
}
inline void setVisible(bool toset)
{
m_is_visible = toset;
}
void setChildrenVisible(bool toset);
void setAttachments();
void removeFromScene(bool permanent);
void addToScene(scene::ISceneManager *smgr, ITextureSource *tsrc,
IrrlichtDevice *irr);
inline void expireVisuals()
{
m_visuals_expired = true;
}
void updateLight(u8 light_at_pos);
void updateLightNoCheck(u8 light_at_pos);
v3s16 getLightPosition();
void updateNodePos();
void step(float dtime, ClientEnvironment *env);
void updateTexturePos();
void updateTextures(const std::string mod);
void updateAnimation();
void updateBonePosition();
void updateAttachments();
void processMessage(const std::string &data);
bool directReportPunch(v3f dir, const ItemStack *punchitem=NULL,
float time_from_last_punch=1000000);
std::string debugInfoText();
std::string infoText()
{
return m_prop.infotext;
}
};
#endif
|