missing files with fixes for shower of bullets

This commit is contained in:
Juan Linietsky 2014-11-06 11:02:40 -03:00
parent 0dbedd18fc
commit fc676fa6f8
4 changed files with 18 additions and 8 deletions

View File

@ -75,7 +75,7 @@ TheoraVideoClip::~TheoraVideoClip()
if (mAudioInterface)
{
mAudioMutex->lock(); // ensure a thread isn't using this mutex
memdelete(mAudioInterface); // notify audio interface it's time to call it a day
delete mAudioInterface; // notify audio interface it's time to call it a day
mAudioMutex ->unlock();
delete mAudioMutex;
}

View File

@ -240,6 +240,11 @@ public:
owner->setTimer(this);
};
void stop() {
stream->stop();
};
void update(float time_increase)
{
mTime = (float)(stream->get_total_wrote() / channels) / freq;
@ -257,7 +262,7 @@ public:
TheoraAudioInterface* createInstance(TheoraVideoClip* owner, int nChannels, int freq) {
printf("************** creating audio output\n");
TheoraAudioInterface* ta = memnew(TPAudioGodot(owner, nChannels, freq));
TheoraAudioInterface* ta = new TPAudioGodot(owner, nChannels, freq);
return ta;
};
};
@ -267,13 +272,16 @@ static TPAudioGodotFactory* audio_factory = NULL;
void VideoStreamTheoraplayer::stop() {
playing = false;
if (clip)
if (clip) {
clip->stop();
clip->seek(0);
};
};
void VideoStreamTheoraplayer::play() {
playing = true;
started = true;
};
bool VideoStreamTheoraplayer::is_playing() const {
@ -452,12 +460,14 @@ void VideoStreamTheoraplayer::set_file(const String& p_file) {
VideoStreamTheoraplayer::~VideoStreamTheoraplayer() {
//if (mgr) {
stop();
//if (mgr) { // this should be a singleton or static or something
// memdelete(mgr);
//};
//mgr = NULL;
if (clip) {
delete clip; // created by video manager with new
mgr->destroyVideoClip(clip);
clip = NULL;
};
};

View File

@ -162,7 +162,7 @@ void Area2D::_body_inout(int p_status,const RID& p_body, int p_instance, int p_b
E->get().shapes.insert(ShapePair(p_body_shape,p_area_shape));
if (E->get().in_tree) {
if (!node || E->get().in_tree) {
emit_signal(SceneStringNames::get_singleton()->body_enter_shape,objid,node,p_body_shape,p_area_shape);
}
@ -188,7 +188,7 @@ void Area2D::_body_inout(int p_status,const RID& p_body, int p_instance, int p_b
eraseit=true;
}
if (node && E->get().in_tree) {
if (!node || E->get().in_tree) {
emit_signal(SceneStringNames::get_singleton()->body_exit_shape,objid,obj,p_body_shape,p_area_shape);
}

View File

@ -437,6 +437,7 @@ Physics2DDirectSpaceStateSW::Physics2DDirectSpaceStateSW() {
void* Space2DSW::_broadphase_pair(CollisionObject2DSW *A,int p_subindex_A,CollisionObject2DSW *B,int p_subindex_B,void *p_self) {
CollisionObject2DSW::Type type_A=A->get_type();
CollisionObject2DSW::Type type_B=B->get_type();
if (type_A>type_B) {
@ -451,7 +452,6 @@ void* Space2DSW::_broadphase_pair(CollisionObject2DSW *A,int p_subindex_A,Collis
if (type_A==CollisionObject2DSW::TYPE_AREA) {
ERR_FAIL_COND_V(type_B!=CollisionObject2DSW::TYPE_BODY,NULL);
Area2DSW *area=static_cast<Area2DSW*>(A);
Body2DSW *body=static_cast<Body2DSW*>(B);